]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.10] bpo-39039: tarfile raises descriptive exception from zlib.error (GH-27766...
authorŁukasz Langa <lukasz@langa.pl>
Wed, 29 Sep 2021 10:19:37 +0000 (12:19 +0200)
committerGitHub <noreply@github.com>
Wed, 29 Sep 2021 10:19:37 +0000 (12:19 +0200)
commitd6b69f21d8ec4af47a9c79f3f50d20be3d0875fc
tree693a309ab231f456b057448c7c63915400402c71
parent1cb17be3e6a4d94629606a613acd07f78d50348b
[3.10] bpo-39039: tarfile raises descriptive exception from zlib.error (GH-27766) (GH-28613)

* during tarfile parsing, a zlib error indicates invalid data
* tarfile.open now raises a descriptive exception from the zlib error
* this makes it clear to the user that they may be trying to open a
  corrupted tar file
(cherry picked from commit b6fe8572509b77d2002eaddf99d718e9b4835684)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
Lib/tarfile.py
Lib/test/test_tarfile.py
Misc/NEWS.d/next/Library/2021-08-18-10-36-14.bpo-39039.A63LYh.rst [new file with mode: 0644]