mirror of
https://github.com/github/codeql.git
synced 2026-04-24 16:25:15 +02:00
JavaScript: Do not flag case-insensitive replace.
This commit is contained in:
@@ -17,9 +17,10 @@ import javascript
|
||||
* `s` and nothing else.
|
||||
*/
|
||||
predicate matchesString(Expr e, string s) {
|
||||
exists (RegExpConstant c |
|
||||
matchesConstant(e.(RegExpLiteral).getRoot(), c) and
|
||||
s = c.getValue()
|
||||
exists (RegExpLiteral rl |
|
||||
rl = e and
|
||||
not rl.isIgnoreCase() and
|
||||
regExpMatchesString(rl.getRoot(), s)
|
||||
)
|
||||
or
|
||||
s = e.getStringValue()
|
||||
|
||||
Reference in New Issue
Block a user