-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
TarFile filters fail in non-UTF-8 locales #133890
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
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
May 17, 2025
UnicodeEncodeError is now handled the same way as OSError during TarFile member extraction.
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
May 17, 2025
UnicodeEncodeError is now handled the same way as OSError during TarFile member extraction.
serhiy-storchaka
added a commit
that referenced
this issue
May 18, 2025
UnicodeEncodeError is now handled the same way as OSError during TarFile member extraction.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
May 18, 2025
UnicodeEncodeError is now handled the same way as OSError during TarFile member extraction. (cherry picked from commit 9983c7d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka
added a commit
that referenced
this issue
May 19, 2025
serhiy-storchaka
added a commit
that referenced
this issue
May 20, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Bug report
test_tarfile
files in non-UTF-8 locales. For example:This happens because they use
os.path.realpath()
for paths in a tar archive, which usesos.stat()
, which fails with unexpectedUnicodeEncodeError
if the path in a tar archive can't be encoded in the current filesystem encoding. This error should be handled at some level, either inos.path.realpath()
or intarfile
.os.stat()
can also raiseValueError
if the path contain null bytes. Don't know if this is relevant here, we should test.Linked PRs
The text was updated successfully, but these errors were encountered: