Message407620
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. |
|
Date |
User |
Action |
Args |
2021-12-04 00:29:55 | andrei.avk | set | recipients:
+ andrei.avk, pitrou, eric.araujo, r.david.murray, docs@python, peter@psantoro.net, huantian |
2021-12-04 00:29:55 | andrei.avk | set | messageid: <1638577795.24.0.847777515278.issue20907@roundup.psfhosted.org> |
2021-12-04 00:29:55 | andrei.avk | link | issue20907 messages |
2021-12-04 00:29:55 | andrei.avk | create | |
|