You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is in python2.5: zipfile.py SVN rev-56308
When testing a zipfile.Zipfile().read() with a password protected zip
file, I would continually get exceptions. So I tracked this down to
line 796-797:
if ord(h[11]) != ((zinfo.CRC>>24)&255):
raise RuntimeError, "Bad password for file %s" % name
When I commented out the error check, the script extracted 150 JPGs with
no corruption or errors in any of the images...so its just seems like an
issue with the error check.
Activity
djw commentedon Aug 23, 2007
This is in python2.5: zipfile.py SVN rev-56308
When testing a zipfile.Zipfile().read() with a password protected zip
file, I would continually get exceptions. So I tracked this down to
line 796-797:
if ord(h[11]) != ((zinfo.CRC>>24)&255):
raise RuntimeError, "Bad password for file %s" % name
scope related data:
bytes =
)¶G\x02ùû¬&\x1E#çÕh[11] =
¯zinfo.CRC =
1554440319ord(h[11]) == 175
((zinfo.CRC>>24)&255) == 92
When I commented out the error check, the script extracted 150 JPGs with
no corruption or errors in any of the images...so its just seems like an
issue with the error check.
gpshead commentedon Aug 30, 2007
can you provide a test zip file demonstrating the problem?
djw commentedon Aug 30, 2007
PW: 13*CrC!x
Verified again that this causes the false exception. Waiting on the
data vendor to give me more info about the file and what is used to
create it.
gpshead commentedon Jan 19, 2008
this failure also occurs on simple zip files created using infozip's zip
with -e to "encrypt" the contents. debugging...
gpshead commentedon Jan 20, 2008
Fixed in r60121 (2.6). zip file decryption "check" bytes were more
complicated than the existing code supported. Algorithm updated.