Skip to content

Commit 27bf992

Browse files
committed
fix zipx
1 parent 746b0f6 commit 27bf992

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/zipx/zipx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func Unzip(srcZip, destDir string, p Policy) (err error) {
112112
if rel == "" || rel == "." {
113113
continue
114114
}
115-
for _, seg := range strings.Split(rel, "/") {
115+
for seg := range strings.SplitSeq(rel, "/") {
116116
if seg == ".." {
117117
return fmt.Errorf("unsafe path traversal in zip (.. segment): %q", f.Name)
118118
}

0 commit comments

Comments
 (0)