JS: recognize Express header access with dynamic name

This commit is contained in:
Asger F
2018-09-26 08:22:21 +01:00
parent e78a4e9f10
commit a47b1dc774
3 changed files with 6 additions and 4 deletions

View File

@@ -483,7 +483,7 @@ module Express {
// `req.headers.name`
kind = "header" and
headers.accesses(request, "headers") and
this = headers.getAPropertyRead(_))
this = headers.getAPropertyRead())
or
exists (string propName | propName = "host" or propName = "hostname" |
// `req.host` and `req.hostname` are derived from headers