JS: Autoformat

This commit is contained in:
Asger Feldthaus
2020-03-07 15:26:36 +00:00
parent a9901a44e8
commit 18eea96cf8
2 changed files with 12 additions and 12 deletions

View File

@@ -669,10 +669,9 @@ private predicate exploratoryFlowStep(
private predicate isSource(DataFlow::Node nd, DataFlow::Configuration cfg, FlowLabel lbl) {
(cfg.isSource(nd) or nd.(AdditionalSource).isSourceFor(cfg)) and
(
if cfg instanceof TaintTracking::Configuration then
lbl = FlowLabel::taint()
else
lbl = FlowLabel::data()
if cfg instanceof TaintTracking::Configuration
then lbl = FlowLabel::taint()
else lbl = FlowLabel::data()
)
or
nd.(AdditionalSource).isSourceFor(cfg, lbl)
@@ -686,10 +685,9 @@ private predicate isSource(DataFlow::Node nd, DataFlow::Configuration cfg, FlowL
private predicate isSink(DataFlow::Node nd, DataFlow::Configuration cfg, FlowLabel lbl) {
(cfg.isSink(nd) or nd.(AdditionalSink).isSinkFor(cfg)) and
(
if cfg instanceof TaintTracking::Configuration then
lbl = FlowLabel::taint()
else
lbl = FlowLabel::data()
if cfg instanceof TaintTracking::Configuration
then lbl = FlowLabel::taint()
else lbl = FlowLabel::data()
)
or
nd.(AdditionalSink).isSinkFor(cfg, lbl)

View File

@@ -107,8 +107,8 @@ module TaintTracking {
}
override predicate isBarrier(DataFlow::Node node) {
super.isBarrier(node) or
super.isBarrier(node)
or
// For variable accesses we block both the data and taint label, as a falsy value
// can't be an object, and thus can't have any tainted properties.
node instanceof DataFlow::VarAccessBarrier
@@ -117,8 +117,10 @@ module TaintTracking {
final override predicate isBarrierEdge(
DataFlow::Node source, DataFlow::Node sink, DataFlow::FlowLabel lbl
) {
super.isBarrierEdge(source, sink, lbl) or
isSanitizerEdge(source, sink, lbl) or
super.isBarrierEdge(source, sink, lbl)
or
isSanitizerEdge(source, sink, lbl)
or
isSanitizerEdge(source, sink) and lbl.isTaint()
}