Skip to content

Commit 4fa33b1

Browse files
authored
Merge pull request github#5146 from github/more-redos-tests
JS: add two non ReDoS regular expressions to the ReDoS test suite
2 parents 179a7a8 + d14586d commit 4fa33b1

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)