restrict char class matches to alpha-numeric chars

This commit is contained in:
Erik Krogh Kristensen
2021-08-10 19:58:56 +02:00
parent 59f0a41665
commit 5d4c434d34

View File

@@ -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