diff --git a/python/ql/lib/semmle/python/frameworks/Aiohttp.qll b/python/ql/lib/semmle/python/frameworks/Aiohttp.qll index e6bc433a01f..546014c2dbf 100644 --- a/python/ql/lib/semmle/python/frameworks/Aiohttp.qll +++ b/python/ql/lib/semmle/python/frameworks/Aiohttp.qll @@ -570,12 +570,8 @@ module AiohttpWebModel { override DataFlow::Node getMimetypeOrContentTypeArg() { result = this.getArgByName("content_type") or - exists(DataFlow::Node headers, Dict d | - headers = this.getArgByName("headers").getALocalSource() - | - headers.asExpr() = d and - d.getAKey().(StrConst).getText().toLowerCase() = "content-type" and - d.getAValue() = result.asExpr() + exists(string key | key.toLowerCase() = "content-type" | + result = this.getKeywordParameter("headers").getSubscript(key).getAValueReachingSink() ) }