We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 422ade1 commit b12e21eCopy full SHA for b12e21e
javascript/ql/test/query-tests/Security/CWE-022/ZipSlip/ZipSlipGood.js
@@ -1,5 +1,6 @@
1
const fs = require('fs');
2
const unzip = require('unzip');
3
+const path = require('path');
4
5
fs.createReadStream('archive.zip')
6
.pipe(unzip.Parse())
@@ -11,4 +12,6 @@ fs.createReadStream('archive.zip')
11
12
else {
13
console.log('skipping bad path', fileName);
14
}
15
+
16
+ fs.createWriteStream(path.join(cwd, path.join('/', fileName)));
17
});
0 commit comments