mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
JS: use isUserControlledObject in js/type-confusion-through-parameter-tampering
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user