Skip to content

Crash when using wrong password to open encrypted zip file #51

Closed

Description

@monobono
NSError *error = nil;

UZKArchive *archive = [[UZKArchive alloc] initWithURL:pathURL password:@"wrongPW" error:&error];

if(![archive validatePassword]) {
}

leads to crash

Activity

  1. self-assigned this
    on Feb 1, 2017
  2. added a commit that references this issue on Feb 1, 2017
  3. abbeycode commented on Feb 1, 2017

    @abbeycode
    Owner

    Hey, thanks for reaching out. I tried reproducing the crash in a test case (which I pushed to a new branch named issue51), but it passes. Can you try modifying that test case so it fails, demonstrating your crash? Also, is this happening for Mac or iOS (and, if iOS, device or simulator)?

  4. abbeycode commented on Apr 24, 2017

    @abbeycode
    Owner

    Is this still a problem for you?

  5. segunlee commented on Jun 12, 2017

    @segunlee

    i got same issue,

    ohno

    1.png file
    1

  6. abbeycode commented on Jun 12, 2017

    @abbeycode
    Owner

    @segunlee Thanks for letting me know! Can you help me reproduce this? If possible, could you send me the archive you're having trouble with, and your code that's causing the crash? I have test cases for incorrect passwords, and they don't crash.

  7. abbeycode commented on Aug 8, 2017

    @abbeycode
    Owner

    @monobono @segunlee Are either of you able to help me reproduce this in a test case? You can checkout the issue51 branch, which has a test case named testValidatePassword_Issue51 I created to help get you started.

  8. amosavian commented on Aug 27, 2017

    @amosavian
    Contributor

    @abbeycode I described how to resolve problem in #56. Just amend your code with my diff 😃

  9. abbeycode commented on Oct 7, 2017

    @abbeycode
    Owner

    @amosavian I'm going through open issues now, so you'll see me replying to a bunch of them. Sorry to hit you all at once :)

    Regarding this one, I see what you proposed in issue #56, but as I just commented there, I would like to have a test case that fails, demonstrating the bug. As I did with the other one, I created an issue51 branch in which I attempted to reproduce the issue, but the test passes. Can you, @segunlee or @monobono please modify it to reproduce this bug? If not, I'll have to close the issue out.

  10. amosavian commented on Oct 7, 2017

    @amosavian
    Contributor

    @abbeycode to create test case as I suggested in #56, You must have a file bigger than 4096 bytes after compressing (size of a chunk) in a password encrypted archive.

  11. abbeycode commented on Oct 7, 2017

    @abbeycode
    Owner

    I somehow missed the 4096 byte comment back then. That's probably all I need to continue on it. Thanks! I'll let you know how it goes and if I have any other questions.

  12. amosavian commented on Oct 7, 2017

    @amosavian
    Contributor

    Thanks in advance ❤️❤️❤️

  13. added this to the 1.9 milestone on Oct 12, 2017
  14. abbeycode commented on Oct 12, 2017

    @abbeycode
    Owner

    I was able to reproduce, and fix. Look for it in the first v1.9 beta!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions