-
-
Notifications
You must be signed in to change notification settings - Fork 47
Request body limiting #341
Copy link
Copy link
Open
Labels
good first issueGood for newcomersGood for newcomerssecurityIssues and enhancements related to (cyber)securityIssues and enhancements related to (cyber)security
Milestone
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomerssecurityIssues and enhancements related to (cyber)securityIssues and enhancements related to (cyber)security
Since we now support uploading files, it's especially important from the security perspective to limit the request body to avoid out-of-memory errors, Denial-of-Service attacks, and similar problems.
The limit should most probably be implemented globally and configurable via the TOML config. When the limit is exceeded in debug mode, a nice error saying that "the max request body size has been exceeded; you might need to increase the X config to avoid this". When the debug mode is off, a regular
HTTP 413 Content Too Largeshould be displayed - this should go through the project's error handler, if any was set.