Skip to content

Commit 5799287

Browse files
authored
go: fix bug in zip-slip example fix
1 parent b248b44 commit 5799287

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

go/ql/src/Security/CWE-022/ZipSlipGood.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func unzipGood(f string) {
1212
for _, f := range r.File {
1313
p, _ := filepath.Abs(f.Name)
1414
// GOOD: Check that path does not contain ".." before using it
15-
if !strings.Contains(p, "..") {
15+
if !strings.Contains(f.Name, "..") {
1616
ioutil.WriteFile(p, []byte("present"), 0666)
1717
}
1818
}

0 commit comments

Comments
 (0)