mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
JavaScript: Improve alert location and message for IncompleteSanitization.
We now highlight the `replace` call (instead of the regular expression), and the alert message for the case of missing backslash escapes clarifies that it is talking about failure to escape backslashes in the input, not in the replacement text.
This commit is contained in:
@@ -127,7 +127,7 @@ where
|
||||
exists(RegExpLiteral rel |
|
||||
isBackslashEscape(repl, rel) and
|
||||
not allBackslashesEscaped(DataFlow::valueNode(repl)) and
|
||||
msg = "This does not backslash-escape the backslash character."
|
||||
msg = "This does not escape backslash characters in the input."
|
||||
)
|
||||
)
|
||||
select old, msg
|
||||
select repl.getCallee(), msg
|
||||
|
||||
Reference in New Issue
Block a user