Skip to content

Commit 01d70a6

Browse files
committed
add test of the new v flag
1 parent 3ec038e commit 01d70a6

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

javascript/ql/test/query-tests/Security/CWE-400/ReDoS/PolynomialBackTracking.expected

+1
Original file line numberDiff line numberDiff line change
@@ -538,3 +538,4 @@
538538
| tst.js:407:128:407:129 | * | Strings starting with '0/*' and with many repetitions of ' ' can start matching anywhere after the start of the preceeding \\s* |
539539
| tst.js:409:23:409:29 | [\\w.-]* | Strings starting with '//' and with many repetitions of '//' can start matching anywhere after the start of the preceeding (\\/(?:\\/[\\w.-]*)*){0,1}:([\\w.-]+) |
540540
| tst.js:411:15:411:19 | a{1,} | Strings with many repetitions of 'a' can start matching anywhere after the start of the preceeding (a{1,})* |
541+
| tst.js:417:20:417:25 | (aa?)* | Strings with many repetitions of 'aa' can start matching anywhere after the start of the preceeding (aa?)*b |

javascript/ql/test/query-tests/Security/CWE-400/ReDoS/ReDoS.expected

+1
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,4 @@
201201
| tst.js:411:15:411:19 | a{1,} | This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'a'. |
202202
| tst.js:413:25:413:35 | (\\u0000\|.)+ | This part of the regular expression may cause exponential backtracking on strings starting with '\\n\\u0000' and containing many repetitions of '\\u0000'. |
203203
| tst.js:415:44:415:57 | (\ud83d\ude80\|.)+ | This part of the regular expression may cause exponential backtracking on strings starting with '\\n\\u{1f680}' and containing many repetitions of '\\u{1f680}'. |
204+
| tst.js:417:22:417:23 | a? | This part of the regular expression may cause exponential backtracking on strings starting with 'a' and containing many repetitions of 'aa'. |

javascript/ql/test/query-tests/Security/CWE-400/ReDoS/tst.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -412,4 +412,6 @@ var bad99 = /(a{1,})*b/;
412412

413413
var unicode = /^\n\u0000(\u0000|.)+$/;
414414

415-
var largeUnicode = new RegExp("^\n\u{1F680}(\u{1F680}|.)+X$");
415+
var largeUnicode = new RegExp("^\n\u{1F680}(\u{1F680}|.)+X$");
416+
417+
var unicodeSets = /(aa?)*b/v;

0 commit comments

Comments
 (0)