forked from mosaicstack/stack
fix(security): M2-008 Valkey key audit — SCAN over KEYS, restrict /gc to admin (#298)
Co-authored-by: Jason Woltje <[email protected]> Co-committed-by: Jason Woltje <[email protected]>
This commit is contained in:
@@ -77,8 +77,8 @@ export class CommandExecutorService {
|
||||
message: 'Retry last message requested.',
|
||||
};
|
||||
case 'gc': {
|
||||
// User-scoped sweep for non-admin; system-wide for admin
|
||||
const result = await this.sessionGC.sweepOrphans(userId);
|
||||
// Admin-only: system-wide GC sweep across all sessions
|
||||
const result = await this.sessionGC.sweepOrphans();
|
||||
return {
|
||||
command: 'gc',
|
||||
success: true,
|
||||
|
||||
Reference in New Issue
Block a user