diff --git a/dist/index.js b/dist/index.js index 7ffc9b2..e9223c3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -97539,7 +97539,7 @@ UnzipStream.prototype._prepareOutStream = function (vars, entry) { var isDirectory = vars.uncompressedSize === 0 && /[\/\\]$/.test(entry.path); // protect against malicious zip files which want to extract to parent dirs - entry.path = entry.path.replace(/^([/\\]*[.]+[/\\]+)*[/\\]*/, ""); + entry.path = entry.path.replace(/(?<=^|[/\\]+)[.][.]+(?=[/\\]+|$)/g, "."); entry.type = isDirectory ? 'Directory' : 'File'; entry.isDirectory = isDirectory; @@ -97603,7 +97603,7 @@ UnzipStream.prototype._prepareOutStream = function (vars, entry) { entry.skip = true; setImmediate(() => { - entry.emit("error", new Error(message)); + self.emit('error', new Error(message)); }); // try to skip over this entry