Skip to content

Commit ea297dd

Browse files
committed
JS: bugfix in handling of custom flow labels
1 parent 74f115f commit ea297dd

File tree

1 file changed

+6
-4
lines changed
  • javascript/ql/src/semmle/javascript/dataflow/internal

1 file changed

+6
-4
lines changed

javascript/ql/src/semmle/javascript/dataflow/internal/FlowSteps.qll

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,12 @@ predicate localFlowStep(DataFlow::Node pred, DataFlow::Node succ,
7474
any(DataFlow::AdditionalFlowStep afs).step(pred, succ) and predlbl = succlbl
7575
or
7676
exists (boolean vp | configuration.isAdditionalFlowStep(pred, succ, vp) |
77-
if vp = false and (predlbl = FlowLabel::data() or predlbl = FlowLabel::taint()) then
78-
succlbl = FlowLabel::taint()
79-
else
80-
predlbl = succlbl
77+
vp = true and
78+
predlbl = succlbl
79+
or
80+
vp = false and
81+
(predlbl = FlowLabel::data() or predlbl = FlowLabel::taint()) and
82+
succlbl = FlowLabel::taint()
8183
)
8284
or
8385
configuration.isAdditionalFlowStep(pred, succ, predlbl, succlbl)

0 commit comments

Comments
 (0)