]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.9] gh-121285: Remove backtracking when parsing tarfile headers (GH-121286) (#123641)
authorSeth Michael Larson <seth@python.org>
Wed, 4 Sep 2024 15:46:01 +0000 (10:46 -0500)
committerGitHub <noreply@github.com>
Wed, 4 Sep 2024 15:46:01 +0000 (17:46 +0200)
commitb4225ca91547aa97ed3aca391614afbb255bc877
tree04a02c788e38da1b34e0c08a97ac0a7c2af42b4e
parentf7be505d137a22528cb0fc004422c0081d5d90e6
[3.9] gh-121285: Remove backtracking when parsing tarfile headers (GH-121286) (#123641)

* Remove backtracking when parsing tarfile headers
* Rewrite PAX header parsing to be stricter
* Optimize parsing of GNU extended sparse headers v0.0

(cherry picked from commit 34ddb64d088dd7ccc321f6103d23153256caa5d4)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Lib/tarfile.py
Lib/test/test_tarfile.py
Misc/NEWS.d/next/Security/2024-07-02-13-39-20.gh-issue-121285.hrl-yI.rst [new file with mode: 0644]