Skip to content

Commit 59de92c

Browse files
authored
Merge pull request github#14027 from erik-krogh/py-reg-app
ReDoS: limit concretize to strings of at most length 100
2 parents 7723dbc + db2b8d4 commit 59de92c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

shared/regex/codeql/regex/nfa/NfaUtils.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1457,7 +1457,8 @@ module Make<RegexTreeViewSig TreeImpl> {
14571457
result = getChar(ancestor) and
14581458
ancestor = getAnAncestor(n) and
14591459
i = nodeDepth(ancestor)
1460-
)
1460+
) and
1461+
nodeDepth(n) < 100
14611462
}
14621463

14631464
/** Gets a string corresponding to `node`. */

0 commit comments

Comments
 (0)