Skip to content

Commit 1f4dad4

Browse files
committed
Update for rename of ReDoSUtil to NfaUtils
1 parent f1a546c commit 1f4dad4

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

javascript/ql/lib/semmle/javascript/security/IncompleteMultiCharacterSanitizationQuery.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ private DangerousPrefixSubstring getADangerousMatchedChar(EmptyReplaceRegExpTerm
3636
result = t.getAMatchedString()
3737
or
3838
// A substring matched by some character class. This is only used to match the "word" part of a HTML tag (e.g. "iframe" in "<iframe").
39-
exists(ReDoSUtil::CharacterClass cc |
40-
cc = ReDoSUtil::getCanonicalCharClass(t) and
39+
exists(NfaUtils::CharacterClass cc |
40+
cc = NfaUtils::getCanonicalCharClass(t) and
4141
cc.matches(result) and
4242
result.regexpMatch("\\w") and
4343
// excluding character classes that match ">" (e.g. /<[^<]*>/), as these might consume nested HTML tags, and thus prevent the dangerous pattern this query is looking for.

javascript/ql/lib/semmle/javascript/security/IncompleteMultiCharacterSanitizationSpecific.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44

55
import javascript
6-
import semmle.javascript.security.performance.ReDoSUtil as ReDoSUtil
6+
import semmle.javascript.security.regexp.NfaUtils as NfaUtils
77

88
class StringSubstitutionCall = StringReplaceCall;
99

ruby/ql/lib/codeql/ruby/security/IncompleteMultiCharacterSanitizationQuery.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ private DangerousPrefixSubstring getADangerousMatchedChar(EmptyReplaceRegExpTerm
3636
result = t.getAMatchedString()
3737
or
3838
// A substring matched by some character class. This is only used to match the "word" part of a HTML tag (e.g. "iframe" in "<iframe").
39-
exists(ReDoSUtil::CharacterClass cc |
40-
cc = ReDoSUtil::getCanonicalCharClass(t) and
39+
exists(NfaUtils::CharacterClass cc |
40+
cc = NfaUtils::getCanonicalCharClass(t) and
4141
cc.matches(result) and
4242
result.regexpMatch("\\w") and
4343
// excluding character classes that match ">" (e.g. /<[^<]*>/), as these might consume nested HTML tags, and thus prevent the dangerous pattern this query is looking for.

ruby/ql/lib/codeql/ruby/security/IncompleteMultiCharacterSanitizationSpecific.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import codeql.ruby.frameworks.core.String
66
import codeql.ruby.regexp.RegExpTreeView
7-
import codeql.ruby.security.performance.ReDoSUtil as ReDoSUtil
7+
import codeql.ruby.security.regexp.NfaUtils as NfaUtils
88

99
/**
1010
* A regexp term that matches substrings that should be replaced with the empty string.

0 commit comments

Comments
 (0)