Skip to content

Commit c62a592

Browse files
committed
JS: Add back CallReceiverStep() restriction
This was initially lost after rebasing with indentation changes
1 parent fb845d5 commit c62a592

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

javascript/ql/lib/semmle/javascript/ApiGraphs.qll

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,9 @@ module API {
13601360
exists(DataFlow::TypeTracker t, StepSummary summary, DataFlow::SourceNode prev |
13611361
prev = trackUseNode(nd, promisified, boundArgs, prop, t) and
13621362
StepSummary::step(prev, res, summary) and
1363-
result = t.append(summary)
1363+
result = t.append(summary) and
1364+
// Block argument-passing into 'this' when it determines the call target
1365+
not summary = CallReceiverStep()
13641366
)
13651367
}
13661368

@@ -1423,7 +1425,9 @@ module API {
14231425
exists(DataFlow::TypeBackTracker t, StepSummary summary, DataFlow::Node next |
14241426
next = trackDefNode(nd, t) and
14251427
StepSummary::step(prev, next, summary) and
1426-
result = t.prepend(summary)
1428+
result = t.prepend(summary) and
1429+
// Block argument-passing into 'this' when it determines the call target
1430+
not summary = CallReceiverStep()
14271431
)
14281432
}
14291433

0 commit comments

Comments
 (0)