Zip
Zip copied to clipboard
Password
Once zipped with password, can't unzip the file with the same password.
I have the same problem.
I've been looking into this and from what I can tell, its not protected with the given password. I've added a new unit test (which fails, as expected) to demonstrate this. In the test I create a zip archive with a password of "password". I then try and unzip this file with a password of "wrong-password" and look for any directories at the given location. To my surprise, the file has been unzipped. The branch can be found here: https://github.com/jwelton/Zip/tree/password-bug.
I should mention, when attempting to open the zip by other means, the password "password" does not work.
Do you mean there is a bug in minizip, the library, which you are using? I did zip with your library and did try to unzip by double clicking the archive:
- On Windows 10 it opens an explorer window, which shows all zipped files. If I double click on one of the files, a small window appears, asking for the password: any password I try is wrong. Extracting not possible. Also if I try to unzip with WinRar, it is telling me, that the correct password is wrong.
- On OS X El Capitan it opens an archive program, which is asking for a password right away: any password I try is not accepted. If I enter a blank password (not possible on Windows), the archive program quits without successful extraction.
That's the same behaviour I'm seeing. I cant say for sure but the password is not null when being passed into minizip. Looks like the problem might be in minizip.
I have the same problem as you and have solved it, please reference my above linked post.
@dttrinh I have used the solution with enabling AES and it works - yes. One drawback is that unpacking still won't work with MacOS default unzip software. You need something like 7zip that supports compression method 99.
Also it doesn't seem like a proper fix, rather a workaround for the existing problem.
same.
I've also got this problem. Create a zip file with a password on OSX. Can't unzip it because the password is rejected. I downloaded the aes folder from https://github.com/nmoinvaz/minizip and added it to the project (perhaps in the wrong way) and added #define HAVE_AES into zip.c - I am not sure what else to do.
Same issue here.
This is still an issue. According to the other thread, does minizip have to be fixed or configured properly in the master branch?