fix: increase max socket.io message size to 10MB for large pastes (#7474)

* fix: increase max socket.io message size to 10MB for large pastes

The default maxHttpBufferSize of 50KB caused socket.io to drop
connections when pasting >10,000 characters. Increased to 10MB which
safely accommodates large paste operations.

Fixes #4951

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: reduce default maxHttpBufferSize to 1MB

10MB was too generous and creates a DoS vector. 1MB (socket.io's own
default) is sufficient for large pastes while limiting memory abuse.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
John McLear 2026-04-06 15:12:08 +01:00 committed by GitHub
parent 2814e5b913
commit 29faec4a04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 73 additions and 16 deletions

View file

@ -366,7 +366,7 @@ const settings: SettingsType = {
* properly, but increasing the value increases susceptibility to denial of service attacks
* (malicious clients can exhaust memory).
*/
maxHttpBufferSize: 50000,
maxHttpBufferSize: 1000000,
},
/*
The authentication method used by the server.