-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0.7.1 ZipSlip vunerability fix (fixes #18)
- Loading branch information
Tim Yates
committed
Jul 2, 2018
1 parent
9b000d2
commit ea5d3fb
Showing
4 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package tests | ||
|
||
import spock.lang.Specification | ||
|
||
import java.nio.file.Files | ||
|
||
class FileTests extends Specification { | ||
|
||
def "check for ZipSlip"() { | ||
given: | ||
def dest = Files.createTempDirectory("zipslip") | ||
def zip = new File(FileTests.class.getResource("/zip-slip.zip").toURI()) | ||
|
||
when: | ||
zip.unzip(dest.toFile()) | ||
|
||
then: | ||
def ex = thrown(IllegalArgumentException) | ||
ex.printStackTrace() | ||
} | ||
|
||
} |
Binary file not shown.