Skip to content

Commit be448e9

Browse files
authored
Merge pull request #89 from abc-x-t/develop
fix(trond): fix path bug
2 parents a769f83 + 4f3bd0b commit be448e9

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

tools/trond/utils/http.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,6 @@ func ExtractTgzWithStatus(tgzFile, destDir string) error {
453453

454454
// Target file path
455455
target := filepath.Join(destDir, sanitizedName)
456-
// Ensure the target path is still within the destination directory
457-
if !strings.HasPrefix(target, filepath.Clean(destDir)+string(os.PathSeparator)) {
458-
return fmt.Errorf("attempted directory traversal: %s", header.Name)
459-
}
460456

461457
switch header.Typeflag {
462458
case tar.TypeDir:

0 commit comments

Comments
 (0)