Skip to content

Commit 82682d9

Browse files
committed
JS: Remove a non-deprecated reference to SanitizerGuardNode
1 parent bc7753d commit 82682d9

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,22 +853,25 @@ module TaintTracking {
853853
*
854854
* This sanitizer is not enabled by default.
855855
*/
856-
class AdHocWhitelistCheckSanitizer extends SanitizerGuardNode, DataFlow::CallNode {
856+
class AdHocWhitelistCheckSanitizer extends DataFlow::CallNode {
857857
AdHocWhitelistCheckSanitizer() {
858858
this.getCalleeName()
859859
.regexpMatch("(?i).*((?<!un)safe|whitelist|(?<!in)valid|allow|(?<!un)auth(?!or\\b)).*") and
860860
this.getNumArgument() = 1
861861
}
862862

863-
override predicate sanitizes(boolean outcome, Expr e) { this.blocksExpr(outcome, e) }
864-
865863
/** Holds if this node blocks flow through `e`, provided it evaluates to `outcome`. */
866864
predicate blocksExpr(boolean outcome, Expr e) {
867865
outcome = true and
868866
e = this.getArgument(0).asExpr()
869867
}
870868
}
871869

870+
deprecated private class AdHocWhitelistCheckSanitizerAsSanitizerGuardNode extends SanitizerGuardNode instanceof AdHocWhitelistCheckSanitizer
871+
{
872+
override predicate sanitizes(boolean outcome, Expr e) { super.blocksExpr(outcome, e) }
873+
}
874+
872875
/** Barrier nodes derived from the `AdHocWhitelistCheckSanitizer` class. */
873876
module AdHocWhitelistCheckSanitizer = DataFlow::MakeBarrierGuard<AdHocWhitelistCheckSanitizer>;
874877

0 commit comments

Comments
 (0)