Add WebSocket maxPayload limit (64KB) (FRE-4747)
Set maxPayload: 65536 on WebSocketServer constructor to bound per-message memory usage, addressing security review recommendation M1 from FRE-4474.
This commit is contained in:
@@ -58,6 +58,7 @@ export class AlertServer {
|
||||
this.wss = new WebSocketServer({
|
||||
port: this.config.port,
|
||||
host: this.config.host,
|
||||
maxPayload: 65536, // 64KB limit to prevent memory exhaustion attacks
|
||||
});
|
||||
|
||||
this.setupWebSocketHandlers();
|
||||
|
||||
Reference in New Issue
Block a user