Skip to content

Commit e118049

Browse files
committed
JS: optimize a prefix-check
1 parent 7f25c1b commit e118049

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript/ql/src/semmle/javascript/security/dataflow/UnsafeJQueryPlugin.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module UnsafeJQueryPlugin {
3636
// prefixing prevents forced html/css confusion:
3737

3838
// prefixing through concatenation:
39-
StringConcatenation::getFirstOperand(succ) != pred
39+
StringConcatenation::getOperand(succ, [1..StringConcatenation::getNumOperand(succ) - 1]) = pred
4040
or
4141
// prefixing through a poor-mans templating system:
4242
exists(DataFlow::MethodCallNode replace |

0 commit comments

Comments
 (0)