Skip to content

Commit a1d8a05

Browse files
committed
JS: Update ResourceExhaustion
1 parent 58a557b commit a1d8a05

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

javascript/ql/lib/semmle/javascript/security/dataflow/ResourceExhaustionQuery.qll

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ class Configuration extends TaintTracking::Configuration {
2222

2323
override predicate isSanitizer(DataFlow::Node node) {
2424
super.isSanitizer(node) or
25-
node instanceof Sanitizer
25+
node instanceof Sanitizer or
26+
node = any(DataFlow::PropRead read | read.getPropertyName() = "length")
2627
}
2728

2829
override predicate isAdditionalTaintStep(DataFlow::Node src, DataFlow::Node dst) {
@@ -32,10 +33,6 @@ class Configuration extends TaintTracking::Configuration {
3233
override predicate isSanitizerGuard(TaintTracking::SanitizerGuardNode guard) {
3334
guard instanceof UpperBoundsCheckSanitizerGuard
3435
}
35-
36-
override predicate isSanitizerEdge(DataFlow::Node pred, DataFlow::Node succ) {
37-
succ.(DataFlow::PropRead).accesses(pred, "length")
38-
}
3936
}
4037

4138
/** Holds if data is converted to a number from `src` to `dst`. */

0 commit comments

Comments
 (0)