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

Feature/encrypted files #39

Closed
wants to merge 6 commits into from

Conversation

mwoc
Copy link
Contributor

@mwoc mwoc commented Aug 22, 2016

I continued with the work in #36, and now actually tried to solve #11 by letting openReadStream call its callback with an error when trying to read an encrypted file.

The reason for emitting events for the encrypted files anyway, is that it can still be relevant for the implementor to know that the file contains zip files. I've added a helper method Entry.prototype.isEncrypted for implementors to check whether or not a file is encrypted.

Maarten Winter added 6 commits August 9, 2016 13:54
It fails because compressionMethod is 0 because the file is empty, but compressedSize is non-zero because the file is encrypted
…ying to read zip containing an encrypted zero-byte file
…crypted file. Update tests to assert that encrypted files don't get read
…ed files now triggers an error instead of extracting the still-encrypted bytes
@thejoshwolfe
Copy link
Owner

Sorry for neglecting this PR. It looks like there's some good stuff in here.

I think I want to get #38 done before adding checks for encryption. I think my plan from #36 about using {decrypt: false} is the way to go here. I'll revisit this PR when #38 is done.

@thejoshwolfe
Copy link
Owner

Thanks for the PR. I've now implemented this myself. The decrypt: false option will be available in yauzl 2.8, which is not released yet, but I'd appreciate any feedback you might have on the feature, which you can read about in the readme.

@thejoshwolfe
Copy link
Owner

the decrypt: false option is now published in yauzl version 2.8

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

Successfully merging this pull request may close these issues.

2 participants