Skip to content

gh-161945: reject zipfile compression mismatches - #161948

Open
woodruffw wants to merge 1 commit into
python:mainfrom
woodruffw-forks:ww/fix-161945
Open

woodruffw wants to merge 1 commit into
python:mainfrom
woodruffw-forks:ww/fix-161945

Conversation

@woodruffw

@woodruffw woodruffw commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

A ZIP archive has two distinct compression fields for
each member (central directory and local file).

The zipfile module now rejects an archive where a member's
compression fields do not match.

Signed-off-by: William Woodruff william@yossarian.net

A ZIP archive has two distinct compression fields for
each member (central directory and local file).

The `zipfile` module now rejects an archive where a member's
compression fields do not match.

Signed-off-by: William Woodruff <william@yossarian.net>
@woodruffw

Copy link
Copy Markdown
Contributor Author

NB I'd suggest backporting this to all non-EOL versions. It should be low risk as real, non-malicous ZIP encoders never mismatch the compression fields like this.

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.

1 participant