Commit 1e50f76
committed
Fix ZipSlip bug found by LGTM.com
The unsanitized path of a zip archive entry, which may
contain '..', was used directly to resolve the destination
path for the files being unzipped.
Although the prefix of the path was checked against `sourceFolder`, there could
be ".." path segments after that.
Extracting files from a malicious archive without validating
that the destination file path is within the destination
directory can cause files outside the destination directory
to be overwritten.1 parent 8174168 commit 1e50f76
File tree
1 file changed
+3
-0
lines changed- runner/src/main/java/com/codingame/gameengine/runner
1 file changed
+3
-0
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
142 | 145 | | |
143 | 146 | | |
144 | 147 | | |
| |||
0 commit comments