Skip to content

Commit 5113087

Browse files
committed
DataFlow: Permit local flow between post-update nodes
1 parent 0b5745c commit 5113087

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

shared/dataflow/codeql/dataflow/internal/DataFlowImplConsistency.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,10 @@ module MakeConsistency<
254254

255255
query predicate postWithInFlow(PostUpdateNode n, string msg) {
256256
not clearsContent(n, _) and
257-
simpleLocalFlowStep(_, n, _) and
257+
exists(Node pred |
258+
simpleLocalFlowStep(pred, n, _) and
259+
not pred instanceof PostUpdateNode
260+
) and
258261
not Input::postWithInFlowExclude(n) and
259262
msg = "PostUpdateNode should not be the target of local flow."
260263
}

0 commit comments

Comments
 (0)