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.

Author andrei.avk
Recipients andrei.avk, docs@python, eric.araujo, huantian, peter@psantoro.net, pitrou, r.david.murray
Date 2021-12-04.00:29:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1638577795.24.0.847777515278.issue20907@roundup.psfhosted.org>
In-reply-to
Content
I think it may be good enough to add a warning on skipped files in _unpack_zipfile().

 - this way we keep backwards compatibility (especially since behavior in both modules differed for such a long time.)

 - it's not clear that ZipFile behavior is superior -- for example, what if a file with stripped path components overwrites existing files?

 - if requested in the future, a parameter can be added to enable ZipFile-like behavior

 - it can be very confusing if files are silently skipped, especially if an archive has thousands of files. 

I've added a PR, note that the test in PR also tests that files with '..' are indeed skipped, we don't have a test for that now, so that's an added benefit.
History
Date User Action Args
2021-12-04 00:29:55andrei.avksetrecipients: + andrei.avk, pitrou, eric.araujo, r.david.murray, docs@python, peter@psantoro.net, huantian
2021-12-04 00:29:55andrei.avksetmessageid: <1638577795.24.0.847777515278.issue20907@roundup.psfhosted.org>
2021-12-04 00:29:55andrei.avklinkissue20907 messages
2021-12-04 00:29:55andrei.avkcreate