This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Improve zipfile handling of corrupted extra field
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: serhiy.storchaka, vstinner
Priority: normal Keywords:

Created on 2017-03-09 15:27 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 583 merged serhiy.storchaka, 2017-03-09 15:33
Messages (4)
msg289302 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-03-09 15:27
The zipfile module can raise struct.error when process corrupted extra field. This issue was partially resolved by issue14315. Following PR converts struct.error to BadZipFile in other case.
msg289307 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-03-09 16:51
I merged your PR, thanks!

I don't think that this minor enhancement on error message is worth it to be backported. It only impacts corrupted ZIP files, and 3.6 and older already raise an error message.

I updated manually the PR status, it seems like the GitHub bot is still broken.
msg289311 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-03-09 17:21
I think the same.
msg290249 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-03-24 22:38
New changeset feccdb2a249a71be330765be77dee57121866779 by Victor Stinner (Serhiy Storchaka) in branch 'master':
bpo-29774: Improve error reporting for corrupted extra field in ZIP file. (#583)
https://github.com/python/cpython/commit/feccdb2a249a71be330765be77dee57121866779
History
Date User Action Args
2022-04-11 14:58:44adminsetgithub: 73960
2017-03-24 22:38:20vstinnersetmessages: + msg290249
2017-03-09 17:21:44serhiy.storchakasetmessages: + msg289311
2017-03-09 16:51:08vstinnersetnosy: + vstinner
messages: + msg289307
2017-03-09 16:48:24serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2017-03-09 15:33:55serhiy.storchakasetpull_requests: + pull_request480
2017-03-09 15:28:25serhiy.storchakasettype: behavior -> enhancement
versions: - Python 2.7, Python 3.5, Python 3.6
2017-03-09 15:27:35serhiy.storchakacreate