Skip to content

Commit e863e23

Browse files
committed
JS: Use sanitizerIn in ExtenralAPIUsedWithUntrustedData
1 parent 094302a commit e863e23

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,11 @@ class Configuration extends TaintTracking::Configuration {
4646
)
4747
}
4848

49-
override predicate isSanitizerEdge(DataFlow::Node pred, DataFlow::Node succ) {
49+
override predicate isSanitizerIn(DataFlow::Node node) {
5050
// Block flow from the location to its properties, as the relevant properties (hash and search) are taint sources of their own.
5151
// The location source is only used for propagating through API calls like `new URL(location)` and into external APIs where
5252
// the whole location object escapes.
53-
exists(DataFlow::PropRead read |
54-
read = DOM::locationRef().getAPropertyRead() and
55-
pred = read.getBase() and
56-
succ = read
57-
)
53+
node = DOM::locationRef().getAPropertyRead()
5854
}
5955
}
6056

0 commit comments

Comments
 (0)