Skip to content

Commit e19b6c2

Browse files
committed
JS: Update taint step
1 parent 13aa511 commit e19b6c2

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

javascript/ql/src/semmle/javascript/frameworks/Templating.qll

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,15 +266,14 @@ module Templating {
266266
}
267267

268268
/**
269-
* A taint step from a `TemplatePlaceholderTag` to the corresponding `GeneratedCodeExpr`,
270-
* representing that control over the generated code gives control over the expression
271-
* return value.
269+
* A taint step from a `TemplatePlaceholderTag` to the enclosing expression in the
270+
* surrounding JavaScript program.
272271
*/
273272
private class PlaceholderToGeneratedCodeStep extends TaintTracking::SharedTaintStep {
274273
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
275-
exists(GeneratedCodeExpr expr |
276-
pred = expr.getPlaceholderTag().asDataFlowNode() and
277-
succ = expr.flow()
274+
exists(TemplatePlaceholderTag tag |
275+
pred = tag.asDataFlowNode() and
276+
succ = tag.getEnclosingExpr().flow()
278277
)
279278
}
280279
}

0 commit comments

Comments
 (0)