Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b418cb5

Browse files
committed
add test case where the successor of the repeating term matches epsilon
1 parent 500b94b commit b418cb5

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

javascript/ql/test/query-tests/Performance/ReDoS/ReDoS.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,4 @@
120120
| tst.js:293:17:293:18 | a+ | This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'a'. |
121121
| tst.js:299:90:299:91 | e+ | This part of the regular expression may cause exponential backtracking on strings starting with '00000000000000' and containing many repetitions of 'e'. |
122122
| tst.js:302:18:302:19 | c+ | This part of the regular expression may cause exponential backtracking on strings starting with 'ab' and containing many repetitions of 'c'. |
123+
| tst.js:305:18:305:20 | \\s+ | This part of the regular expression may cause exponential backtracking on strings containing many repetitions of ' '. |

javascript/ql/test/query-tests/Performance/ReDoS/tst.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,3 +300,6 @@ var bad65 = /(^|;)(0|1)(0|1)(0|1)(0|1)(0|1)(0|1)(0|1)(0|1)(0|1)(0|1)(0|1)(0|1)(0
300300

301301
// NOT GOOD
302302
var bad66 = /^ab(c+)+$/;
303+
304+
// NOT GOOD
305+
var bad67 = /(\d(\s+)*){20}/;

0 commit comments

Comments
 (0)