mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
HttpResponseBody: Move .getAPredecessor*() to the test query.
This commit is contained in:
@@ -240,7 +240,7 @@ private module CleverGo {
|
||||
)
|
||||
}
|
||||
|
||||
override DataFlow::Node getAContentTypeNode() { result = contentTypeNode.getAPredecessor*() }
|
||||
override DataFlow::Node getAContentTypeNode() { result = contentTypeNode }
|
||||
|
||||
override HTTP::ResponseWriter getResponseWriter() { none() }
|
||||
}
|
||||
|
||||
@@ -11,8 +11,13 @@ class HttpResponseBodyTest extends InlineExpectationsTest {
|
||||
exists(HTTP::ResponseBody rd |
|
||||
rd.hasLocationInfo(file, line, _, _, _) and
|
||||
(
|
||||
element = rd.getAContentType().toString() and
|
||||
value = rd.getAContentType().toString() and
|
||||
(
|
||||
element = rd.getAContentType().toString() and
|
||||
value = rd.getAContentType()
|
||||
or
|
||||
element = rd.getAContentTypeNode().toString() and
|
||||
value = rd.getAContentTypeNode().getAPredecessor*().getStringValue()
|
||||
) and
|
||||
tag = "contentType"
|
||||
or
|
||||
element = rd.toString() and
|
||||
|
||||
Reference in New Issue
Block a user