mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
Python: simplify using getSubscript
This commit is contained in:
@@ -570,12 +570,8 @@ module AiohttpWebModel {
|
|||||||
override DataFlow::Node getMimetypeOrContentTypeArg() {
|
override DataFlow::Node getMimetypeOrContentTypeArg() {
|
||||||
result = this.getArgByName("content_type")
|
result = this.getArgByName("content_type")
|
||||||
or
|
or
|
||||||
exists(DataFlow::Node headers, Dict d |
|
exists(string key | key.toLowerCase() = "content-type" |
|
||||||
headers = this.getArgByName("headers").getALocalSource()
|
result = this.getKeywordParameter("headers").getSubscript(key).getAValueReachingSink()
|
||||||
|
|
|
||||||
headers.asExpr() = d and
|
|
||||||
d.getAKey().(StrConst).getText().toLowerCase() = "content-type" and
|
|
||||||
d.getAValue() = result.asExpr()
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user