Skip to content

Commit 2f6696e

Browse files
Jami CogswellJami Cogswell
Jami Cogswell
authored and
Jami Cogswell
committed
Java: add test
1 parent 9d6a10b commit 2f6696e

File tree

1 file changed

+5
-0
lines changed
  • java/ql/test/library-tests/pathsanitizer

1 file changed

+5
-0
lines changed

java/ql/test/library-tests/pathsanitizer/Test.java

+5
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,11 @@ public void directoryCharsSanitizer() throws Exception {
729729
source = source.replaceAll(".|[/\\\\]", "");
730730
sink(source); // $ hasTaintFlow
731731
}
732+
{
733+
String source = (String) source();
734+
source = source.replaceAll("\\.|/|\\\\", "");
735+
sink(source); // Safe
736+
}
732737
{
733738
String source = (String) source();
734739
source = source.replaceAll("[\\./\\\\]", "");

0 commit comments

Comments
 (0)