Skip to content

Commit

Permalink
Detect and throw error with encrypted files
Browse files Browse the repository at this point in the history
  • Loading branch information
5saviahv committed Nov 18, 2020
1 parent c64ac14 commit 63ed6e2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions zipEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ module.exports = function (/*Buffer*/input) {
return compressedData;
}

if (_entryHeader.encripted){
if (async && callback) callback(Buffer.alloc(0), Utils.Errors.UNKNOWN_METHOD);
throw new Error(Utils.Errors.UNKNOWN_METHOD);
}

var data = Buffer.alloc(_entryHeader.size);

switch (_entryHeader.method) {
Expand Down

0 comments on commit 63ed6e2

Please sign in to comment.