Skip to content

Commit 7e21081

Browse files
committed
add comment about regexp detected by js/polynomial-redos
1 parent 28cffa1 commit 7e21081

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript/ql/src/Performance/ReDoS.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ predicate isFork(State q, InputSymbol s1, InputSymbol s2, State r1, State r2) {
195195
// (every epsilon-loop must contain such a state).
196196
//
197197
// We additionally require that the there exists another InfiniteRepetitionQuantifier `mid` on the path from `q` to itself.
198-
// This is done to avoid flagging regular expressions such as `/(a?)*b/` - that only has polynomial runtime.
198+
// This is done to avoid flagging regular expressions such as `/(a?)*b/` - that only has polynomial runtime, and is detected by `js/polynomial-redos`.
199199
// The below code is therefore a heuritic, that only flags regular expressions such as `/(a*)*b/`,
200200
// and does not flag regular expressions such as `/(a?b?)c/`, but the latter pattern is not used frequently.
201201
r1 = r2 and

0 commit comments

Comments
 (0)