File tree Expand file tree Collapse file tree
javascript/ql/lib/semmle/javascript/dataflow Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments