Update HTTP library.

This commit is contained in:
Max Schaefer
2020-01-16 11:50:29 +00:00
parent a2879dc754
commit 9f897132f2

View File

@@ -97,17 +97,15 @@ private module StdlibHttp {
private class RequestBody extends HTTP::RequestBody::Range, DataFlow::ExprNode {
RequestBody() {
exists(DataFlow::CallNode newRequestCall |
newRequestCall.getTarget().hasQualifiedName("net/http", "NewRequest")
|
this = newRequestCall.getArgument(2)
exists(Function newRequest |
newRequest.hasQualifiedName("net/http", "NewRequest") and
this = newRequest.getACall().getArgument(2)
)
or
exists(Write w, DataFlow::Node base, Field body, Type request |
w.writesField(base, body, this) and
exists(Field body, Type request |
request.hasQualifiedName("net/http", "Request") and
request.getPointerType() = base.getType().getUnderlyingType() and
body.getName() = "Body"
body = request.getField("Body") and
this = body.getAWrite().getRhs()
)
}
}