[issue41772] Zipfile.testzip considers wrong password as correct

Amir Mohamadi report at bugs.python.org
Sat Sep 12 02:49:58 EDT 2020


New submission from Amir Mohamadi <amiremohamadi at yahoo.com>:

Zipfile.testzip sometimes works perfectly with wrong password. refer to poc.py I've a zip file with password '76453' and when I try a wrong password with extractall:

    myzip.setpassword('10006050')
    myzip.extractall()

it raises a Bad CRC-32 exception. but when I try testzip instead of extractall:

    myzip.setpassword('10006050')
    myzip.testzip()

no exception is raised

----------
Added file: https://bugs.python.org/file49452/poc.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41772>
_______________________________________


More information about the Python-bugs-list mailing list