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.
2 parents a769f83 + 4f3bd0b commit be448e9Copy full SHA for be448e9
tools/trond/utils/http.go
@@ -453,10 +453,6 @@ func ExtractTgzWithStatus(tgzFile, destDir string) error {
453
454
// Target file path
455
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
- }
460
461
switch header.Typeflag {
462
case tar.TypeDir:
0 commit comments