mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-08 09:44:25 +02:00
fix: opt out of stricter java rules for zip64 and dot entries (#3178)
* fix: opt out of stricter java rules for zip64 and dot entries * test: assert specific system properties for test suite
This commit is contained in:
parent
3fdc06a46f
commit
1493d9d357
@ -42,6 +42,12 @@ public class Main {
|
|||||||
// headless
|
// headless
|
||||||
System.setProperty("java.awt.headless", "true");
|
System.setProperty("java.awt.headless", "true");
|
||||||
|
|
||||||
|
// Ignore stricter validation on zip files from java 11 onwards as this is a protection technique
|
||||||
|
// that applications use to thwart disassembly tools. We have protections in place for directory traversal
|
||||||
|
// and handling of bogus data in the zip header, so we can ignore this.
|
||||||
|
System.setProperty("jdk.nio.zipfs.allowDotZipEntry", "true");
|
||||||
|
System.setProperty("jdk.util.zip.disableZip64ExtraFieldValidation", "true");
|
||||||
|
|
||||||
// set verbosity default
|
// set verbosity default
|
||||||
Verbosity verbosity = Verbosity.NORMAL;
|
Verbosity verbosity = Verbosity.NORMAL;
|
||||||
|
|
||||||
|
@ -142,6 +142,10 @@ subprojects {
|
|||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
|
|
||||||
test {
|
test {
|
||||||
|
// https://github.com/iBotPeaches/Apktool/issues/3174
|
||||||
|
systemProperty 'jdk.nio.zipfs.allowDotZipEntry', 'true'
|
||||||
|
systemProperty 'jdk.util.zip.disableZip64ExtraFieldValidation', 'true'
|
||||||
|
|
||||||
testLogging {
|
testLogging {
|
||||||
exceptionFormat = 'full'
|
exceptionFormat = 'full'
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user