Skip to content

[3.9] gh-121285: Remove backtracking when parsing tarfile headers (GH-121286)#123641

Merged
ambv merged 2 commits into
python:3.9from
sethmlarson:backport-34ddb64-3.9
Sep 4, 2024
Merged

[3.9] gh-121285: Remove backtracking when parsing tarfile headers (GH-121286)#123641
ambv merged 2 commits into
python:3.9from
sethmlarson:backport-34ddb64-3.9

Conversation

@sethmlarson

@sethmlarson sethmlarson commented Sep 3, 2024

Copy link
Copy Markdown
Contributor
  • 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 34ddb64)

…rs (pythonGH-121286)

* 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 34ddb64)

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>
@sethmlarson

Copy link
Copy Markdown
Contributor Author

Fixed the failures, the ReadError from tarfile.open() no longer includes all the sub-errors that occurred per-compression format so we can only look at the top-level error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

2 participants