-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Implement PEP 706 – Filter for tarfile.extractall #102950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Also remove expilcit `type=tarfile.DIRTYPE`, the slash at the end is enough.
… sticky bit (GH-103831) Also remove expilcit `type=tarfile.DIRTYPE`, the slash at the end is enough.
…et the sticky bit (pythonGH-103831) Also remove expilcit `type=tarfile.DIRTYPE`, the slash at the end is enough. Backport of c8c3956
…H-102953) (GH-103832) See [Backporting & Forward Compatibility in PEP 706](https://peps.python.org/pep-0706/#backporting-forward-compatibility). - Backport b52ad18 - Backport c8c3956 - Remove the DeprecationWarning - Adjust docs - Remove new `__all__` entries
And I really think #73974 (CVE-2007-4559) should be mentioned somewhere in this PR. |
…et the sticky bit (pythonGH-103831) Also remove expilcit `type=tarfile.DIRTYPE`, the slash at the end is enough. Backport of c8c3956
Well, the PR was open for a month, but now it's closed. Feel free to suggest an update to the docs. |
…H-102953) (GH-104128) - Backport b52ad18 - Backport c8c3956 - Remove the DeprecationWarning - Adjust docs - Remove new `__all__` entries Co-authored-by: Petr Viktorin <[email protected]>
…et the sticky bit (pythonGH-103831) Also remove expilcit `type=tarfile.DIRTYPE`, the slash at the end is enough. Backport of c8c3956
…et the sticky bit (pythonGH-103831) Also remove expilcit `type=tarfile.DIRTYPE`, the slash at the end is enough. Backport of c8c3956
…et the sticky bit (pythonGH-103831) Also remove expilcit `type=tarfile.DIRTYPE`, the slash at the end is enough. Backport of c8c3956
Per the discussion in #104583, we have decided that it is not feasible to safely merge the proposed 3.7 version of this fix prior to 3.7's imminent end-of-life. Third-party distributors of cPython who plan to provide support for 3.7 past its official end-of-life are free, of course, to choose to merge or adapt the PR for their users. |
I would say “deals with”, which should cover everything. ;) |
Hi, I just upgraded from 3.11 to Python 3.12 and this PR is producing DeprecationWarnings (ok) that can't be easily avoided (not ok!) while calling shutil.unpack_archive(): While the idea of a deprecation warning for tarfile with filter=None is clearly reasonable, the impact of this on shutil.unpack_archive() is really unfortunate and could use more consideration. The whole point of unpack_archive is to provide a way to unpack an archive without the caller having to special-case different archive formats. It's now impossible to use unpack_archive for different formats in Python 3.12 without either a) hitting the new v3.12 deprecation warning for not specifying filter='...' (imho it's not ok to ignore warnings!), or b) special-casing how caller invokes unpack_archive() for different archive types i.e. passing filter='data' if archive contains .tar/tgz/txz/etc but filter=None if archive is a zipfile. Determining which case is not trivial for the caller of unpack_archive(), and should be taken care of by the library. Both of those options are pretty gross and make this change very hard to adapt to without gross hacks or disabling deprecation warnings (not a great practice). Some possible solutions:
Right now it's a breaking change and I can't see any nice way to work around it. |
Implement PEP 706 – Filter for tarfile.extractall Upstream issue: python#102950 Tracker bug: https://bugzilla.redhat.com/show_bug.cgi?id=263261
Add API for allowing checks on the content of tar files, allowing callers to mitigate directory traversal (CVE-2007-4559) and related issues. Python 3.12 will warn if this API is not used. Python 3.14 will fail if it's not used. Backport from python#102950 Change document: https://peps.python.org/pep-0706/
Add API for allowing checks on the content of tar files, allowing callers to mitigate directory traversal (CVE-2007-4559) and related issues. Python 3.12 will warn if this API is not used. Python 3.14 will fail if it's not used. Backport from python#102950 Change document: https://peps.python.org/pep-0706/
Add API for allowing checks on the content of tar files, allowing callers to mitigate directory traversal (CVE-2007-4559) and related issues. Python 3.12 will warn if this API is not used. Python 3.14 will fail if it's not used. Backport from python#102950 Change document: https://peps.python.org/pep-0706/
Add API for allowing checks on the content of tar files, allowing callers to mitigate directory traversal (CVE-2007-4559) and related issues. Python 3.12 will warn if this API is not used. Python 3.14 will fail if it's not used. Backport from python#102950 Change document: https://peps.python.org/pep-0706/
Add API for allowing checks on the content of tar files, allowing callers to mitigate directory traversal (CVE-2007-4559) and related issues. Python 3.12 will warn if this API is not used. Python 3.14 will fail if it's not used. Backport from python#102950 Change document: https://peps.python.org/pep-0706/
Add API for allowing checks on the content of tar files, allowing callers to mitigate directory traversal (CVE-2007-4559) and related issues. Python 3.12 will warn if this API is not used. Python 3.14 will fail if it's not used. Backport from python#102950 Change document: https://peps.python.org/pep-0706/
Add API for allowing checks on the content of tar files, allowing callers to mitigate directory traversal (CVE-2007-4559) and related issues. Python 3.12 will warn if this API is not used. Python 3.14 will fail if it's not used. Backport from python#102950 Change document: https://peps.python.org/pep-0706/
Add API for allowing checks on the content of tar files, allowing callers to mitigate directory traversal (CVE-2007-4559) and related issues. Python 3.12 will warn if this API is not used. Python 3.14 will fail if it's not used. Backport from python#102950 Change document: https://peps.python.org/pep-0706/
Add API for allowing checks on the content of tar files, allowing callers to mitigate directory traversal (CVE-2007-4559) and related issues. Python 3.12 will warn if this API is not used. Python 3.14 will fail if it's not used. Backport from python#102950 Change document: https://peps.python.org/pep-0706/
…et the sticky bit (pythonGH-103831) Also remove expilcit `type=tarfile.DIRTYPE`, the slash at the end is enough. Backport of c8c3956
Add API for allowing checks on the content of tar files, allowing callers to mitigate directory traversal (CVE-2007-4559) and related issues. Python 3.12 will warn if this API is not used. Python 3.14 will fail if it's not used. Backport from python#102950 Change document: https://peps.python.org/pep-0706/
Add API for allowing checks on the content of tar files, allowing callers to mitigate directory traversal (CVE-2007-4559) and related issues. Python 3.12 will warn if this API is not used. Python 3.14 will fail if it's not used. Backport from python#102950 Change document: https://peps.python.org/pep-0706/
This issue tracks implementation of PEP 706 – Filter for tarfile.extractall
Linked PRs
Unofficial backport
The text was updated successfully, but these errors were encountered: