Skip to content

Commit a6dfb83

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

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
@@ -1371,7 +1371,9 @@ module API {
13711371
exists(DataFlow::TypeTracker t, StepSummary summary, DataFlow::SourceNode prev |
13721372
prev = trackUseNode(nd, promisified, boundArgs, prop, t) and
13731373
StepSummary::step(prev, res, summary) and
1374-
result = t.append(summary)
1374+
result = t.append(summary) and
1375+
// Block argument-passing into 'this' when it determines the call target
1376+
not summary = CallReceiverStep()
13751377
)
13761378
}
13771379

@@ -1434,7 +1436,9 @@ module API {
14341436
exists(DataFlow::TypeBackTracker t, StepSummary summary, DataFlow::Node next |
14351437
next = trackDefNode(nd, t) and
14361438
StepSummary::step(prev, next, summary) and
1437-
result = t.prepend(summary)
1439+
result = t.prepend(summary) and
1440+
// Block argument-passing into 'this' when it determines the call target
1441+
not summary = CallReceiverStep()
14381442
)
14391443
}
14401444

0 commit comments

Comments
 (0)