Skip to content

Commit 9d77b88

Browse files
authored
Clean tar save file path (#1236)
1 parent 6fd0e7a commit 9d77b88

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/npmrc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ func extractPackageTarball(installDir string, pkgName string, tarball io.Reader)
546546
}
547547
// strip tarball root dir
548548
_, name := utils.SplitByFirstByte(h.Name, '/')
549-
filename := path.Join(pkgDir, name)
549+
filename := path.Join(pkgDir, path.Clean(name))
550550
if h.Typeflag != tar.TypeReg {
551551
continue
552552
}

0 commit comments

Comments
 (0)