Skip to content

Commit a54f0a7

Browse files
committed
JS: Target post-update node instead of getALocalSource
getAPropertyWrite() contains getALocalSource() under the the hood. Don't rely on that to find the successor of a mutation.
1 parent 6e074c3 commit a54f0a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ module TaintTracking {
409409
not assgn.getWriteNode() instanceof Property and // not a write inside an object literal
410410
pred = assgn.getRhs() and
411411
assgn = obj.getAPropertyWrite() and
412-
succ = obj
412+
succ = assgn.getBase().getPostUpdateNode()
413413
|
414414
obj instanceof DataFlow::ObjectLiteralNode
415415
or

0 commit comments

Comments
 (0)