mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
restrict char class matches to alpha-numeric chars
This commit is contained in:
@@ -67,7 +67,8 @@ DangerousPrefixSubstring getADangerousMatchedChar(EmptyReplaceRegExpTerm t) {
|
||||
or
|
||||
t.getAMatchedString() = result
|
||||
or
|
||||
ReDoSUtil::getCanonicalCharClass(t).(ReDoSUtil::CharacterClass).matches(result)
|
||||
ReDoSUtil::getCanonicalCharClass(t).(ReDoSUtil::CharacterClass).matches(result) and
|
||||
result.regexpMatch("\\w")
|
||||
or
|
||||
t instanceof RegExpDot and
|
||||
result.length() = 1
|
||||
|
||||
Reference in New Issue
Block a user