Skip to content

Commit d14586d

Browse files
authored
add two non ReDoS regular expressions to the ReDoS test suite
Adds the regular expression from github#5145
1 parent 02578cf commit d14586d

File tree

1 file changed

+4
-0
lines changed
  • javascript/ql/test/query-tests/Performance/ReDoS

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,3 +351,7 @@ var bad79 = /(a*)*b/;
351351
var bad80 = /(a+)*b/;
352352
var bad81 = /(a*)+b/;
353353
var bad82 = /(a+)+b/;
354+
355+
// GOOD
356+
var good40 = /(a|b)+/;
357+
var good41 = /(?:[\s;,"'<>(){}|[\]@=+*]|:(?![/\\]))+/;

0 commit comments

Comments
 (0)