Skip to content

Commit 526fff6

Browse files
committed
Check for zip slip
1 parent 42dc489 commit 526fff6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/main/kotlin/me/urielsalis/mccrashlib/deobfuscator/Deobfuscator.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fun isZipSlip(version: String): Boolean {
5050
val canonicalDestinationDir = mappingsFile.canonicalPath
5151
val destinationFile = File(mappingsFile, version)
5252
val canonicalDestinationFile = destinationFile.canonicalPath
53-
return canonicalDestinationFile.startsWith(canonicalDestinationDir + File.separator)
53+
return !canonicalDestinationFile.startsWith(canonicalDestinationDir + File.separator)
5454
}
5555

5656
private fun downloadMapping(version: String, name: String, isClient: Boolean) {

0 commit comments

Comments
 (0)