Skip to content

gh-83245: Raise BadZipFile instead of ValueError when reading a corrupt file - #32291

Merged
serhiy-storchaka merged 11 commits into
python:mainfrom
dignissimus:bpo-30964
May 23, 2022
Merged

gh-83245: Raise BadZipFile instead of ValueError when reading a corrupt file#32291
serhiy-storchaka merged 11 commits into
python:mainfrom
dignissimus:bpo-30964

Conversation

@dignissimus

@dignissimus dignissimus commented Apr 3, 2022

Copy link
Copy Markdown
Contributor

@dignissimus dignissimus changed the title bpo-30964: Raise BadZipFile isntead of ValueError when reading a corrupt file bpo-39064: Raise BadZipFile isntead of ValueError when reading a corrupt file Apr 3, 2022
Comment thread Lib/zipfile.py
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
@dignissimus dignissimus changed the title bpo-39064: Raise BadZipFile isntead of ValueError when reading a corrupt file bpo-39064: Raise BadZipFile instead of ValueError when reading a corrupt file Apr 4, 2022
@dignissimus dignissimus changed the title bpo-39064: Raise BadZipFile instead of ValueError when reading a corrupt file gh-83245: Raise BadZipFile instead of ValueError when reading a corrupt file Apr 14, 2022

@MaxwellDupre MaxwellDupre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ran 258 tests in 59.938s
OK (skipped=1)
Looks ok.

@serhiy-storchaka serhiy-storchaka 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.

LGTM in general, but I have few nitpicks.

Comment thread Lib/test/test_zipfile.py Outdated
Comment thread Lib/test/test_zipfile.py Outdated
Comment thread Lib/zipfile.py Outdated
Comment thread Misc/NEWS.d/next/Library/2022-04-03-19-40-09.bpo-39064.76PbIz.rst Outdated
dignissimus and others added 4 commits April 23, 2022 13:09
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@jvoisin jvoisin mannequin mentioned this pull request Apr 10, 2022
Comment thread Lib/test/test_zipfile.py Outdated
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@serhiy-storchaka serhiy-storchaka added type-bug An unexpected behavior, bug, or error needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels May 23, 2022
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @dignissimus for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @dignissimus for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@bedevere-bot

Copy link
Copy Markdown

GH-93140 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label May 23, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 23, 2022
… corrupt ZIP file (pythonGH-32291)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 202ed25)

Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 23, 2022
… corrupt ZIP file (pythonGH-32291)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 202ed25)

Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

GH-93141 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label May 23, 2022
miss-islington added a commit that referenced this pull request May 25, 2022
…a corrupt ZIP file (GH-32291) (GH-93141)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 202ed25)


Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>

Automerge-Triggered-By: GH:serhiy-storchaka
miss-islington added a commit that referenced this pull request May 25, 2022
…a corrupt ZIP file (GH-32291) (GH-93140)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 202ed25)


Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>

Automerge-Triggered-By: GH:serhiy-storchaka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants