Closed
Description
Steps to reproduce
- Create a zip file with AES-256 encryption and an empty password. I have some created in the past with DotNetZip. I don't think they can be created with SharpZipLib.
- Create a ZipFile object from the zip file and set the Password field to "".
- Try to extract.
Expected behavior
The zip file is opened and extracted.
Actual behavior
The code acts as if no password has been set and throws exception "No password available for AES encrypted stream".
I see the setter code doesn't differentiate between null and empty string: https://github.com/icsharpcode/SharpZipLib/blob/master/src/ICSharpCode.SharpZipLib/Zip/ZipFile.cs#L360
7zip and DotNetZip allow these files to be extracted with an empty password, but I can't work out if they are just being more lenient than they need to be.
Version of SharpZipLib
1.2.0