Skip to content

Fix: add 1MB size limit on request body to prevent DoS#65

Merged
JohnMcLear merged 1 commit into
mainfrom
fix/request-body-size-limit
Apr 14, 2026
Merged

Fix: add 1MB size limit on request body to prevent DoS#65
JohnMcLear merged 1 commit into
mainfrom
fix/request-body-size-limit

Conversation

@JohnMcLear

Copy link
Copy Markdown
Member

Summary

The POST /post endpoint buffered the entire request body with no size limit. An attacker could send an arbitrarily large payload to exhaust server memory.

Now rejects requests larger than 1MB with HTTP 413 (Payload Too Large) and destroys the connection.

Test plan

  • POST with body < 1MB works as before
  • POST with body > 1MB returns 413

🤖 Generated with Claude Code

The POST /post endpoint buffered the entire request body with no size
limit, allowing an attacker to exhaust server memory. Now rejects
requests larger than 1MB with HTTP 413.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JohnMcLear JohnMcLear merged commit 060eddd into main Apr 14, 2026
3 checks passed
@JohnMcLear JohnMcLear deleted the fix/request-body-size-limit branch April 14, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant