[issue41772] Zipfile.testzip considers wrong password as correct

2020-09-12 Thread Eric V. Smith
Eric V. Smith added the comment: I believe what testzip is doing is validating the structural integrity of the file, which appears can be tested without decrypting the contents. Although it is odd that if you don't call setpassword, even with the wrong password, testzip will raise a RuntimeE

[issue41772] Zipfile.testzip considers wrong password as correct

2020-09-11 Thread Amir Mohamadi
New submission from Amir Mohamadi : 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.

[issue41772] Zipfile.testzip considers wrong password as correct

2020-09-11 Thread Amir Mohamadi
Change by Amir Mohamadi : Added file: https://bugs.python.org/file49453/encrypted.zip ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue41772] Zipfile.testzip considers wrong password as correct

2020-09-11 Thread Amir Mohamadi
Change by Amir Mohamadi : -- components: Library (Lib) nosy: Amir priority: normal severity: normal status: open title: Zipfile.testzip considers wrong password as correct type: behavior ___ Python tracker __