Skip to content

Commit 6da1007

Browse files
committed
mark new redos tests correctly
1 parent b2b736d commit 6da1007

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,5 +499,5 @@
499499
| tst.js:373:24:373:30 | [^"\\s]+ | Strings with many repetitions of '!' can start matching anywhere after the start of the preceeding ("[^"]*?"\|[^"\\s]+)+ |
500500
| tst.js:374:15:374:16 | x* | Strings with many repetitions of 'x' can start matching anywhere after the start of the preceeding (x*)+(?=$) |
501501
| tst.js:375:15:375:16 | x* | Strings with many repetitions of 'x' can start matching anywhere after the start of the preceeding (x*)+(?=$\|y) |
502-
| tst.js:376:15:376:21 | [\\s\\S]* | Strings with many repetitions of 'a' can start matching anywhere after the start of the preceeding ([\\s\\S]*)+(?=$) |
503-
| tst.js:377:15:377:21 | [\\s\\S]* | Strings with many repetitions of 'a' can start matching anywhere after the start of the preceeding ([\\s\\S]*)+(?=$\|y) |
502+
| tst.js:378:16:378:22 | [\\s\\S]* | Strings with many repetitions of 'a' can start matching anywhere after the start of the preceeding ([\\s\\S]*)+(?=$) |
503+
| tst.js:379:16:379:22 | [\\s\\S]* | Strings with many repetitions of 'a' can start matching anywhere after the start of the preceeding ([\\s\\S]*)+(?=$\|y) |

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,5 +176,5 @@
176176
| tst.js:373:24:373:30 | [^"\\s]+ | This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '!'. |
177177
| tst.js:374:15:374:16 | x* | This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'x'. |
178178
| tst.js:375:15:375:16 | x* | This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'x'. |
179-
| tst.js:376:15:376:21 | [\\s\\S]* | This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'a'. |
180-
| tst.js:377:15:377:21 | [\\s\\S]* | This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'a'. |
179+
| tst.js:378:16:378:22 | [\\s\\S]* | This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'a'. |
180+
| tst.js:379:16:379:22 | [\\s\\S]* | This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'a'. |

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,5 +373,7 @@ var bad87 = /("[^"]*?"|[^"\s]+)+(?=\s*|\s*$)X/g;
373373
var bad88 = /("[^"]*?"|[^"\s]+)+(?=X)/g;
374374
var bad89 = /(x*)+(?=$)/
375375
var bad90 = /(x*)+(?=$|y)/
376-
var bad91 = /([\s\S]*)+(?=$)/
377-
var bad92 = /([\s\S]*)+(?=$|y)/
376+
377+
// GOOD - but we spuriously conclude that a rejecting suffix exists.
378+
var good44 = /([\s\S]*)+(?=$)/;
379+
var good45 = /([\s\S]*)+(?=$|y)/;

0 commit comments

Comments
 (0)