Skip to content

Commit 62c17d3

Browse files
committed
JS: Update SanitizerGuardNode use in BasicTaintTracking test
1 parent f620191 commit 62c17d3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

javascript/ql/test/library-tests/TaintTracking/BasicTaintTracking.ql

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,26 @@ deprecated class LegacyConfig extends TaintTracking::Configuration {
3434
}
3535

3636
override predicate isSanitizerGuard(TaintTracking::SanitizerGuardNode node) {
37-
node instanceof BasicSanitizerGuard or
37+
node instanceof BasicSanitizerGuardLegacy or
3838
node instanceof TaintTracking::AdHocWhitelistCheckSanitizer
3939
}
4040
}
4141

4242
deprecated import testUtilities.LegacyDataFlowDiff::DataFlowDiff<TestFlow, LegacyConfig>
4343

44-
class BasicSanitizerGuard extends TaintTracking::SanitizerGuardNode, DataFlow::CallNode {
44+
class BasicSanitizerGuard extends DataFlow::CallNode {
4545
BasicSanitizerGuard() { this = getACall("isSafe") }
4646

47-
override predicate sanitizes(boolean outcome, Expr e) { this.blocksExpr(outcome, e) }
48-
4947
predicate blocksExpr(boolean outcome, Expr e) {
5048
outcome = true and e = this.getArgument(0).asExpr()
5149
}
5250
}
5351

52+
deprecated class BasicSanitizerGuardLegacy extends TaintTracking::SanitizerGuardNode instanceof BasicSanitizerGuard
53+
{
54+
override predicate sanitizes(boolean outcome, Expr e) { super.blocksExpr(outcome, e) }
55+
}
56+
5457
query predicate flow = TestFlow::flow/2;
5558

5659
deprecated class Consistency extends ConsistencyConfiguration {

0 commit comments

Comments
 (0)