Skip to content

Commit 32c1088

Browse files
committed
Java: Add test case.
1 parent 0a0e9bb commit 32c1088

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

java/ql/test/query-tests/security/CWE-730/ExpRedosTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ class ExpRedosTest {
8686
// NOT GOOD; attack: "\n".repeat(100) + "."
8787
"(?s)(.|\\n)*!", // $ hasExpRedos
8888

89+
// NOT GOOD; attack: "\n".repeat(100) + "."
90+
"(?is)(.|\\n)*!", // $ MISSING: hasExpRedos
91+
8992
// GOOD
9093
"([\\w.]+)*",
9194

@@ -120,7 +123,7 @@ class ExpRedosTest {
120123
"\"((?:\\\\[\\x00-\\x7f]|[^\\x00-\\x08\\x0a-\\x1f\\x7f\"])*)\"", // $ MISSING: hasExpRedos
121124

122125
// GOOD
123-
"\"((?:\\\\[\\x00-\\x7f]|[^\\x00-\\x08\\x0a-\\x1f\\x7f\"\\\\])*)\"",
126+
"\"((?:\\\\[\\x00-\\x7f]|[^\\x00-\\x08\\x0a-\\x1f\\x7f\"\\\\])*)\"",
124127

125128
// NOT GOOD
126129
"(([a-z]|[d-h])*)\"", // $ hasExpRedos

0 commit comments

Comments
 (0)