JS: optimize a prefix-check

This commit is contained in:
Esben Sparre Andreasen
2020-02-03 08:39:20 +01:00
parent 7f25c1bf47
commit e1180495f5

View File

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