Skip to content

Harden upload file handling#4291

Open
bozicovichsantiago20-oss wants to merge 1 commit into
SecureBananaLabs:mainfrom
bozicovichsantiago20-oss:codex/harden-upload-file-handling
Open

Harden upload file handling#4291
bozicovichsantiago20-oss wants to merge 1 commit into
SecureBananaLabs:mainfrom
bozicovichsantiago20-oss:codex/harden-upload-file-handling

Conversation

@bozicovichsantiago20-oss

Copy link
Copy Markdown

Summary

  • require /api/uploads requests to include an actual file instead of returning 201 for empty uploads
  • cap in-memory multer uploads at 5 MB
  • return clear upload errors, including 413 for over-limit files
  • add route tests for missing, valid, and oversized uploads

Fixes #4290

Tests

  • node --test apps/api/src/tests/*.test.js
  • npm test --workspace apps/api currently fails because the existing script runs node --test src/tests, which Node tries to resolve as a module directory instead of the test files

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.

Upload route accepts missing files and lacks a memory size limit

1 participant