Skip to content

Commit f0343d0

Browse files
author
Esben Sparre Andreasen
committed
JS: use isUserControlledObject in js/type-confusion-through-parameter-tampering
1 parent a2df4f9 commit f0343d0

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,7 @@ module TypeConfusionThroughParameterTampering {
5454
private class TypeTamperableRequestParameter extends Source {
5555

5656
TypeTamperableRequestParameter() {
57-
this.(HTTP::RequestInputAccess).getKind() = "parameter" and
58-
not exists (Express::RequestExpr request, DataFlow::PropRead base |
59-
// Express's `req.params.name` is always a string
60-
base.accesses(request.flow(), "params") and
61-
this = base.getAPropertyRead(_)
62-
)
57+
this.(HTTP::RequestInputAccess).isUserControlledObject()
6358
}
6459

6560
}

0 commit comments

Comments
 (0)