JS: use isUserControlledObject in js/type-confusion-through-parameter-tampering

This commit is contained in:
Esben Sparre Andreasen
2018-11-07 12:11:37 +01:00
parent a2df4f9bfe
commit f0343d0678

View File

@@ -54,12 +54,7 @@ module TypeConfusionThroughParameterTampering {
private class TypeTamperableRequestParameter extends Source {
TypeTamperableRequestParameter() {
this.(HTTP::RequestInputAccess).getKind() = "parameter" and
not exists (Express::RequestExpr request, DataFlow::PropRead base |
// Express's `req.params.name` is always a string
base.accesses(request.flow(), "params") and
this = base.getAPropertyRead(_)
)
this.(HTTP::RequestInputAccess).isUserControlledObject()
}
}