Skip to content

Commit deb2173

Browse files
committed
JS: Update our own queries
1 parent 61ef73b commit deb2173

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

javascript/ql/src/semmle/javascript/security/TaintedObject.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ module TaintedObject {
8484
* Sanitizer guard that blocks deep object taint.
8585
*/
8686
abstract class SanitizerGuard extends TaintTracking::LabeledSanitizerGuardNode {
87-
override FlowLabel getALabel() { result = label() }
8887
}
8988

9089
/**
@@ -110,9 +109,10 @@ module TaintedObject {
110109
)
111110
}
112111

113-
override predicate sanitizes(boolean outcome, Expr e) {
112+
override predicate sanitizes(boolean outcome, Expr e, FlowLabel label) {
114113
polarity = outcome and
115-
e = typeof.getOperand()
114+
e = typeof.getOperand() and
115+
label = label()
116116
}
117117
}
118118
}

javascript/ql/src/semmle/javascript/security/dataflow/UnvalidatedDynamicMethodCall.qll

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,10 @@ module UnvalidatedDynamicMethodCall {
142142
astNode.getAnOperand().getUnderlyingValue() = t
143143
}
144144

145-
override predicate sanitizes(boolean outcome, Expr e) {
145+
override predicate sanitizes(boolean outcome, Expr e, DataFlow::FlowLabel label) {
146146
outcome = astNode.getPolarity() and
147-
e = t.getOperand().getUnderlyingValue()
147+
e = t.getOperand().getUnderlyingValue() and
148+
label instanceof MaybeNonFunction
148149
}
149-
150-
override DataFlow::FlowLabel getALabel() { result instanceof MaybeNonFunction }
151150
}
152151
}

0 commit comments

Comments
 (0)