Skip to content

Commit 03bdebe

Browse files
committed
JS: Update a test.
The test had a bug on the line `src = src` so the new code is "more equivalent than usual"
1 parent b09ed4b commit 03bdebe

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

javascript/ql/test/library-tests/InterProceduralFlow/DataFlowConfig.qll

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ class TestDataFlowConfiguration extends DataFlow::Configuration {
2222
f.getName().matches("%noReturnTracking%") and
2323
node = f.getAReturnedExpr().flow()
2424
)
25-
}
26-
27-
override predicate isBarrierEdge(DataFlow::Node src, DataFlow::Node snk) {
28-
src = src and
29-
snk.asExpr().(PropAccess).getPropertyName() = "notTracked"
25+
or
26+
node.asExpr().(PropAccess).getPropertyName() = "notTracked"
3027
}
3128
}

javascript/ql/test/library-tests/InterProceduralFlow/tests.ql

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,8 @@ class TestTaintTrackingConfiguration extends TaintTracking::Configuration {
6161
f.getName().matches("%noReturnTracking%") and
6262
node = f.getAReturnedExpr().flow()
6363
)
64-
}
65-
66-
override predicate isSanitizerEdge(DataFlow::Node src, DataFlow::Node snk) {
67-
src = src and
68-
snk.asExpr().(PropAccess).getPropertyName() = "notTracked"
64+
or
65+
node.asExpr().(PropAccess).getPropertyName() = "notTracked"
6966
}
7067
}
7168

@@ -99,11 +96,8 @@ class GermanFlowConfig extends DataFlow::Configuration {
9996
f.getName().matches("%noReturnTracking%") and
10097
node = f.getAReturnedExpr().flow()
10198
)
102-
}
103-
104-
override predicate isBarrierEdge(DataFlow::Node src, DataFlow::Node snk) {
105-
src = src and
106-
snk.asExpr().(PropAccess).getPropertyName() = "notTracked"
99+
or
100+
node.asExpr().(PropAccess).getPropertyName() = "notTracked"
107101
}
108102
}
109103

0 commit comments

Comments
 (0)