Skip to content

@tus/server: validate deferred upload size before declaring length - #913

Open
ferhatelmas wants to merge 1 commit into
tus:mainfrom
ferhatelmas:precheck
Open

ferhatelmas wants to merge 1 commit into
tus:mainfrom
ferhatelmas:precheck

Conversation

@ferhatelmas

@ferhatelmas ferhatelmas commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

When a PATCH declares the length of a deferred upload, the server saves that length before checking whether the request body fits. An oversized request returns 413 but leaves the length fixed.

Now, the server checks the declared Content-Length first. If the body would exceed the upload length, it returns 413 without saving the length or writing the body.


Devin Review

Signed-off-by: Ferhat Elmas <elmas.ferhat@gmail.com>
@changeset-bot

changeset-bot Bot commented Nov 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 196baf4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@tus/server Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

This branch is waiting to be deployed

1 waiting deployment
external-testing — 196baf4b Waiting Nov 15, 2026 by ferhatelmas via Tests #155
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