[issue10876] Zipfile sometimes considers a false password to be correct

2011-01-18 Thread Kira Erethon
Kira Erethon added the comment: I'm a newbie in python and tried this in order to learn.I created all the zip files (first created a .txt file and zipped it with a password), so I know the file inside the zip is encrypted ( ofc I know the password too). Tried this with different .txt files an

[issue10876] Zipfile sometimes considers a false password to be correct

2011-01-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'm catching all errors and exceptions and zipfile still decompresses > it, that's what I've been trying to tell you. I don't face my original > problem anymore, I'm catching that exception, now zipfile considers > some passwords to be correct and throw no exc

[issue10876] Zipfile sometimes considers a false password to be correct

2011-01-18 Thread Kira Erethon
Kira Erethon added the comment: I'm catching all errors and exceptions and zipfile still decompresses it, that's what I've been trying to tell you. I don't face my original problem anymore, I'm catching that exception, now zipfile considers some passwords to be correct and throw no exception,

[issue10876] Zipfile sometimes considers a false password to be correct

2011-01-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: As I already explained: * why it doesn't detect that the password is bad is because the ZIP format is not well-designed enough * you can catch the zlib error which indicates that decryption returned junk -- resolution: -> invalid status: open -> close

[issue10876] Zipfile sometimes considers a false password to be correct

2011-01-18 Thread Kira Erethon
Changes by Kira Erethon : -- components: +Library (Lib) -Extension Modules ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue10876] Zipfile sometimes considers a false password to be correct

2011-01-18 Thread Kira Erethon
Kira Erethon added the comment: Sorry to re-open this, but I consider it an important bug. Tried it in 3.1 also and it's still there. To sum up what's happening, zipfile sometimes considers a false password to be correct and proceeds with decrypting the file. Is there a workaround in this? Or