Skip to content

Commit b9f642f

Browse files
Jami CogswellJami Cogswell
authored andcommitted
Java: condense '.' matching
1 parent 2f6696e commit b9f642f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/ql/lib/semmle/code/java/security/PathSanitizer.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ private predicate replacesDirectoryCharactersWithSingleReplaceAll(
428428
targetValue.matches("[%\\\\\\\\%]")
429429
or
430430
targetValue.matches("%|%") and
431-
targetValue.matches("%" + ["\\.\\.", "[.][.]", "\\."] + "%") and
431+
targetValue.matches("%" + ["[.]", "\\."] + "%") and
432432
targetValue.matches("%/%") and
433433
targetValue.matches("%\\\\\\\\%")
434434
)

0 commit comments

Comments
 (0)