From 2ec14266fd383f532cb8f80f9acb36564842cefc Mon Sep 17 00:00:00 2001 From: sky5454 Date: Tue, 31 Mar 2026 17:58:21 +0800 Subject: [PATCH] fix(lint): lint fixed2 --- pkg/updater/updater.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/updater/updater.go b/pkg/updater/updater.go index bd688a335..9a2d378b2 100644 --- a/pkg/updater/updater.go +++ b/pkg/updater/updater.go @@ -550,7 +550,8 @@ func extractTarFromReader(tr *tar.Reader, destDir string) error { return err } target := filepath.Clean(filepath.Join(filepath.Clean(destDir), hdr.Name)) - if !strings.HasPrefix(target, filepath.Clean(destDir)+string(os.PathSeparator)) && target != filepath.Clean(destDir) { + if !strings.HasPrefix(target, filepath.Clean(destDir)+string(os.PathSeparator)) && + target != filepath.Clean(destDir) { return fmt.Errorf("path traversal detected: %s", hdr.Name) } switch hdr.Typeflag {