This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author aymill
Recipients aymill
Date 2010-07-05.17:42:21
SpamBayes Score 6.686405e-08
Marked as misclassified No
Message-id <1278351743.73.0.460439084815.issue9170@psf.upfronthosting.co.za>
In-reply-to
Content
On a WinZip AES-256 encrypted zip, zipfile.extractall raises a RuntimeError for "Bad password for file" when given the correct password. Command line example below:

Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) 
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from zipfile import ZipFile
>>> zip = ZipFile("example.zip", "r")
>>> zip.extractall(".", pwd="cat")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/zipfile.py", line 935, in extractall
    self.extract(zipinfo, path, pwd)
  File "/usr/lib/python2.6/zipfile.py", line 923, in extract
    return self._extract_member(member, path, pwd)
  File "/usr/lib/python2.6/zipfile.py", line 963, in _extract_member
    source = self.open(member, pwd=pwd)
  File "/usr/lib/python2.6/zipfile.py", line 898, in open
    raise RuntimeError("Bad password for file", name)
RuntimeError: ('Bad password for file', <zipfile.ZipInfo object at 0xb739e26c>)
>>>
History
Date User Action Args
2010-07-05 17:42:23aymillsetrecipients: + aymill
2010-07-05 17:42:23aymillsetmessageid: <1278351743.73.0.460439084815.issue9170@psf.upfronthosting.co.za>
2010-07-05 17:42:22aymilllinkissue9170 messages
2010-07-05 17:42:21aymillcreate