Skip to content

Commit

Permalink
[#514] fix contains('..') in path in jar file
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentschoelens committed Apr 1, 2024
1 parent d4a51e5 commit 7ba6830
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void scan() {
while (jarFileEntries.hasMoreElements()) {
JarEntry entry = jarFileEntries.nextElement();
String name = entry.getName();
if (name.startsWith("..") || name.startsWith("/")) {
if (name.contains("..") || name.startsWith("/")) {
// ignore "zip slip" file pattern attack
continue;
}
Expand Down

0 comments on commit 7ba6830

Please sign in to comment.