File tree Expand file tree Collapse file tree 2 files changed +7
-18
lines changed
javascript/ql/src/semmle/javascript Expand file tree Collapse file tree 2 files changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -1814,19 +1814,3 @@ class VarAccessBarrier extends DataFlow::Node {
1814
1814
)
1815
1815
}
1816
1816
}
1817
-
1818
- /**
1819
- * A check of the form `whitelist.includes(x)` or equivalent, which sanitizes `x` in its "then" branch.
1820
- *
1821
- * Can be added to `isBarrierGuard` in a data-flow configuration to block flow through such checks.
1822
- */
1823
- class MembershipTestBarrierGuard extends BarrierGuardNode {
1824
- MembershipCandidate candidate ;
1825
-
1826
- MembershipTestBarrierGuard ( ) { this = candidate .getTest ( ) }
1827
-
1828
- override predicate blocks ( boolean outcome , Expr e ) {
1829
- candidate = e .flow ( ) and
1830
- candidate .getTestPolarity ( ) = outcome
1831
- }
1832
- }
Original file line number Diff line number Diff line change @@ -373,9 +373,14 @@ module TaintedPath {
373
373
/**
374
374
* A check of the form `whitelist.includes(x)` or equivalent, which sanitizes `x` in its "then" branch.
375
375
*/
376
- class MembershipTestBarrierGuard extends BarrierGuardNode , DataFlow:: MembershipTestBarrierGuard {
376
+ class MembershipTestBarrierGuard extends BarrierGuardNode {
377
+ MembershipCandidate candidate ;
378
+
379
+ MembershipTestBarrierGuard ( ) { this = candidate .getTest ( ) }
380
+
377
381
override predicate blocks ( boolean outcome , Expr e ) {
378
- DataFlow:: MembershipTestBarrierGuard .super .blocks ( outcome , e )
382
+ candidate = e .flow ( ) and
383
+ candidate .getTestPolarity ( ) = outcome
379
384
}
380
385
}
381
386
You can’t perform that action at this time.
0 commit comments