Skip to content

Commit 71100bb

Browse files
committed
JS: Do not require predecessor to be a SourceNode
1 parent 53d4b2d commit 71100bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

javascript/ql/src/semmle/javascript/dataflow/TaintTracking.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ module TaintTracking {
268268
(name = "map" or name = "forEach") and
269269
(i = 0 or i = 2) and
270270
call.getArgument(0).analyze().getAValue().(AbstractFunction).getFunction() = f and
271-
pred.(DataFlow::SourceNode).getAMethodCall(name) = call and
271+
call.(DataFlow::MethodCallNode).getMethodName() = name and
272+
pred = call.getReceiver() and
272273
succ = DataFlow::parameterNode(f.getParameter(i))
273274
)
274275
or

0 commit comments

Comments
 (0)