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.
This commit is contained in:
Asger F
2025-02-17 15:00:02 +01:00
parent 6e074c301f
commit a54f0a74f1

View File

@@ -409,7 +409,7 @@ module TaintTracking {
not assgn.getWriteNode() instanceof Property and // not a write inside an object literal
pred = assgn.getRhs() and
assgn = obj.getAPropertyWrite() and
succ = obj
succ = assgn.getBase().getPostUpdateNode()
|
obj instanceof DataFlow::ObjectLiteralNode
or