mirror of
https://github.com/github/codeql.git
synced 2026-01-30 14:52:57 +01:00
Add model for net/http.Error
This commit is contained in:
@@ -108,8 +108,6 @@ module NetHttp {
|
||||
|
||||
override string getHeaderName() { result = "status" }
|
||||
|
||||
override string getHeaderValue() { result = this.getValue().getIntValue().toString() }
|
||||
|
||||
override DataFlow::Node getName() { none() }
|
||||
|
||||
override DataFlow::Node getValue() { result = this.getArgument(0) }
|
||||
@@ -117,6 +115,18 @@ module NetHttp {
|
||||
override HTTP::ResponseWriter getResponseWriter() { result.getANode() = this.getReceiver() }
|
||||
}
|
||||
|
||||
private class ResponseErrorCall extends HTTP::HeaderWrite::Range, DataFlow::CallNode {
|
||||
ResponseErrorCall() { this.getTarget().hasQualifiedName("net/http", "Error") }
|
||||
|
||||
override string getHeaderName() { result = "status" }
|
||||
|
||||
override DataFlow::Node getName() { none() }
|
||||
|
||||
override DataFlow::Node getValue() { result = this.getArgument(2) }
|
||||
|
||||
override HTTP::ResponseWriter getResponseWriter() { result.getANode() = this.getArgument(0) }
|
||||
}
|
||||
|
||||
private class RequestBody extends HTTP::RequestBody::Range, DataFlow::ExprNode {
|
||||
RequestBody() {
|
||||
exists(Function newRequest |
|
||||
|
||||
Reference in New Issue
Block a user