diff --git a/pkg/bundle/bundle.go b/pkg/bundle/bundle.go index 38cf216ed4..2a32ea78ba 100644 --- a/pkg/bundle/bundle.go +++ b/pkg/bundle/bundle.go @@ -240,7 +240,7 @@ func Unpack(in io.Reader, targetPath string) error { } var target = filepath.Join(targetPath, header.Name) - if strings.Contains(target, "..") { + if strings.Contains(target, "/../") { return fmt.Errorf("targetPath validation failed, path contains unexpected special elements") }