Skip to content

Commit

Permalink
Appease GHAS
Browse files Browse the repository at this point in the history
  • Loading branch information
niik committed Oct 22, 2024
1 parent 943ea99 commit 0554c65
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions script/download-git.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ const unpackFile = file =>
.pipe(new createGunzip())
.pipe(extract())
.on('entry', ({ type, name, mode, linkname }, stream, next) => {
if (name.includes('..')) {
throw new Error(`invalid file name: ${name}`)
}
const p = resolvePath(config.outputPath, name)
assert.ok(p.startsWith(config.outputPath))
if (type === 'file') {
Expand Down

0 comments on commit 0554c65

Please sign in to comment.