| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
In `tarfile` library, FilterError with error_level set to 0 correctly logged a debugging message but did not properly skip extraction of a member. Updates filter functions to return None when a FilterError is seen, as stated in docs.
|
Thank you for the fix. I included it, in a “Ship of Theseus” style, in #135037 which fixes a few other security issues as well. I forgot to include you in the Git authorship metadata. I apologize for that. You're credited in What's New though: https://docs.python.org/3.14/whatsnew/3.14.html#tarfile |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
In tarfile library, if a FilterError is raised for a member during TarFile.extract() or TarFile.extractall() with errorlevel set to 0, a debugging message is correctly logged but the unsafe member is still extracted. Based on the documentation and a look at the code, it seems that the desired expectation with errorlevel=0 is to not raise an exception, but skip member extraction and log the error.
Updates tarfile to properly handle FilterError and skip extraction on unsafe members even when an exception is not raised.
This issue was reported on Python 3.11 and should likely be backported as it is a security issue.
From the docs: