Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password #23

Open
Aerocan opened this issue Jul 7, 2016 · 10 comments
Open

Password #23

Aerocan opened this issue Jul 7, 2016 · 10 comments

Comments

@Aerocan
Copy link

Aerocan commented Jul 7, 2016

Once zipped with password, can't unzip the file with the same password.

@PjotrC
Copy link

PjotrC commented Jul 16, 2016

I have the same problem.

@jwelton
Copy link
Contributor

jwelton commented Jul 20, 2016

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.

@PjotrC
Copy link

PjotrC commented Jul 20, 2016

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.

@jwelton
Copy link
Contributor

jwelton commented Jul 20, 2016

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.

@dttrinh
Copy link

dttrinh commented Oct 14, 2016

I have the same problem as you and have solved it, please reference my above linked post.

@maciejpigulski
Copy link

maciejpigulski commented Nov 17, 2016

@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.

@ValentinKuznetsov
Copy link

same.

@jukwaphil
Copy link

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.

@mostafaberg mostafaberg marked this as a duplicate of #55 Jul 19, 2017
@iblacksun
Copy link

Same issue here.

@basememara
Copy link

basememara commented Jan 21, 2018

This is still an issue. According to the other thread, does minizip have to be fixed or configured properly in the master branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants