Skip to content

Commit 18eea96

Browse files
committed
JS: Autoformat
1 parent a9901a4 commit 18eea96

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -669,10 +669,9 @@ private predicate exploratoryFlowStep(
669669
private predicate isSource(DataFlow::Node nd, DataFlow::Configuration cfg, FlowLabel lbl) {
670670
(cfg.isSource(nd) or nd.(AdditionalSource).isSourceFor(cfg)) and
671671
(
672-
if cfg instanceof TaintTracking::Configuration then
673-
lbl = FlowLabel::taint()
674-
else
675-
lbl = FlowLabel::data()
672+
if cfg instanceof TaintTracking::Configuration
673+
then lbl = FlowLabel::taint()
674+
else lbl = FlowLabel::data()
676675
)
677676
or
678677
nd.(AdditionalSource).isSourceFor(cfg, lbl)
@@ -686,10 +685,9 @@ private predicate isSource(DataFlow::Node nd, DataFlow::Configuration cfg, FlowL
686685
private predicate isSink(DataFlow::Node nd, DataFlow::Configuration cfg, FlowLabel lbl) {
687686
(cfg.isSink(nd) or nd.(AdditionalSink).isSinkFor(cfg)) and
688687
(
689-
if cfg instanceof TaintTracking::Configuration then
690-
lbl = FlowLabel::taint()
691-
else
692-
lbl = FlowLabel::data()
688+
if cfg instanceof TaintTracking::Configuration
689+
then lbl = FlowLabel::taint()
690+
else lbl = FlowLabel::data()
693691
)
694692
or
695693
nd.(AdditionalSink).isSinkFor(cfg, lbl)

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ module TaintTracking {
107107
}
108108

109109
override predicate isBarrier(DataFlow::Node node) {
110-
super.isBarrier(node) or
111-
110+
super.isBarrier(node)
111+
or
112112
// For variable accesses we block both the data and taint label, as a falsy value
113113
// can't be an object, and thus can't have any tainted properties.
114114
node instanceof DataFlow::VarAccessBarrier
@@ -117,8 +117,10 @@ module TaintTracking {
117117
final override predicate isBarrierEdge(
118118
DataFlow::Node source, DataFlow::Node sink, DataFlow::FlowLabel lbl
119119
) {
120-
super.isBarrierEdge(source, sink, lbl) or
121-
isSanitizerEdge(source, sink, lbl) or
120+
super.isBarrierEdge(source, sink, lbl)
121+
or
122+
isSanitizerEdge(source, sink, lbl)
123+
or
122124
isSanitizerEdge(source, sink) and lbl.isTaint()
123125
}
124126

0 commit comments

Comments
 (0)