Files
gh-christianlouis-docuelevate/docs
copilot-swe-agent[bot] ca27a0b687 feat(security): add request size limits to API endpoints
- Add RequestSizeLimitMiddleware that checks Content-Length header
  before request body is read: non-multipart requests capped at
  MAX_REQUEST_BODY_SIZE (default 1 MB), multipart uploads capped at
  MAX_UPLOAD_SIZE (default 1 GB). Returns HTTP 413 on violation.
- Register middleware in app/main.py
- Add max_request_body_size setting to app/config.py
- Fix ui_upload in files.py to check Content-Length early and read
  in 64 KB chunks (bounded memory usage), removing the post-write
  os.path.getsize check
- Document MAX_REQUEST_BODY_SIZE in .env.demo and ConfigurationGuide.md
- Mark SECURITY_AUDIT.md item #4 as resolved
- Add 9 tests in test_request_size_limit.py
- Update test_upload_file_too_large to use patch.object instead of
  the now-unused os.path.getsize mock

Closes #173

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-22 14:41:04 +00:00
..
2025-04-04 00:38:12 +02:00
2025-04-04 00:38:12 +02:00

DocuElevate Documentation

Welcome to the DocuElevate documentation. This directory contains comprehensive guides to help you install, configure, and use DocuElevate effectively.

Available Documentation

Additional Resources

Support

If you need additional assistance beyond what's covered in these guides:

  1. Check the GitHub repository for updates and issues
  2. Contact the developer through the information provided on the About page

Screenshots

Upload Interface DocuElevate's upload interface

Files View Document management interface

Status View System management interface

Workflow Diagram DocuElevate processing workflow