Skip to content

fix: reject oversized and invalid zip uploads (#25877)#26189

Open
jdomeracki-coder wants to merge 1 commit into
release/2.32from
cherry-pick/25877/release/2.32
Open

fix: reject oversized and invalid zip uploads (#25877)#26189
jdomeracki-coder wants to merge 1 commit into
release/2.32from
cherry-pick/25877/release/2.32

Conversation

@jdomeracki-coder

@jdomeracki-coder jdomeracki-coder commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Backport of #25877 to release/2.32.

Cherry-picked with git cherry-pick -x (2f011fd2a3); the commit body references the original PR.

Generated by Coder Agents on behalf of @jdomeracki-coder.

Enforce aggregate limits when converting uploaded ZIP archives to tar
so compressed inputs cannot expand without bound in memory.

Also treat malformed ZIP entry metadata and content mismatches as
client errors during conversion, returning 400 for invalid archives and
413 when expanded tar output exceeds the upload limit.

Ref: https://linear.app/codercom/issue/PLAT-274/zip-upload-decompressed-without-aggregate-size-limit-sec-103
(cherry picked from commit 2f011fd)

@f0ssel f0ssel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Backport of #25877 to release/2.32.

Verified as a clean version backport: identical changed files and diff stats to the sibling backports of this fix on the other release branches, with no unrelated files touched. Approving as requested.

This review was generated by Coder Agents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants