mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-41068: Fix read after write in zipfile for non-ASCII files names. (GH-21040)
This commit is contained in:
parent
c88239f864
commit
36ff513f82
3 changed files with 8 additions and 1 deletions
|
@ -1534,7 +1534,7 @@ class ZipFile:
|
|||
# strong encryption
|
||||
raise NotImplementedError("strong encryption (flag bit 6)")
|
||||
|
||||
if zinfo.flag_bits & 0x800:
|
||||
if fheader[_FH_GENERAL_PURPOSE_FLAG_BITS] & 0x800:
|
||||
# UTF-8 filename
|
||||
fname_str = fname.decode("utf-8")
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue