mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
JS: optimize a prefix-check
This commit is contained in:
@@ -36,7 +36,7 @@ module UnsafeJQueryPlugin {
|
||||
// prefixing prevents forced html/css confusion:
|
||||
|
||||
// prefixing through concatenation:
|
||||
StringConcatenation::getFirstOperand(succ) != pred
|
||||
StringConcatenation::getOperand(succ, [1..StringConcatenation::getNumOperand(succ) - 1]) = pred
|
||||
or
|
||||
// prefixing through a poor-mans templating system:
|
||||
exists(DataFlow::MethodCallNode replace |
|
||||
|
||||
Reference in New Issue
Block a user