Skip to content

fix: bound browser upload chunk reads - #720

Merged
BrandonRobare merged 2 commits into
mainfrom
stack/v204-c1-upload-01-585
Aug 20, 2026
Merged

fix: bound browser upload chunk reads#720
BrandonRobare merged 2 commits into
mainfrom
stack/v204-c1-upload-01-585

Conversation

@BrandonRobare

Copy link
Copy Markdown
Owner

Closes #585

Problem

Browser-upload, flight-log, and SRT handlers allocated entire multipart payloads before enforcing configured size limits.

Changes

  • add one shared limit + 1 upload reader
  • use it in browser chunks, flight logs, and SRT uploads
  • preserve existing HTTP 413 messages and browser state/path/offset ordering
  • add helper and actual multipart browser-endpoint regressions

Verification

  • focused: 31 passed
  • full suite: 1,054 passed, 5 skipped
  • Ruff and diff checks passed
  • sabotage of browser endpoint back to await chunk.read() failed the endpoint regression as required
  • repaired exact SHA independently accepted: 3ae55d027676483d10f13695dd658468c608a81e

Read uploads through one shared limit-plus-one reader so oversized browser chunks are rejected before application-level full allocation. Reuse the reader for flight-log and SRT uploads.
@BrandonRobare BrandonRobare added backend FastAPI/backend service work bug Something isn't working performance Performance, bundle size, scalability priority: high High-priority correctness or safety issue python Pull requests that update python code security labels Aug 13, 2026
@BrandonRobare
BrandonRobare merged commit 9d30c8f into main Aug 20, 2026
10 checks passed
@BrandonRobare
BrandonRobare deleted the stack/v204-c1-upload-01-585 branch August 21, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend FastAPI/backend service work bug Something isn't working performance Performance, bundle size, scalability priority: high High-priority correctness or safety issue python Pull requests that update python code security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bound browser-upload chunk reads before allocation

1 participant