mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Ruby: Avoid a forced CP.
This commit is contained in:
@@ -54,6 +54,14 @@ class NetHttpRequest extends Http::Client::Request::Range, DataFlow::CallNode {
|
|||||||
override DataFlow::Node getAUrlPart() {
|
override DataFlow::Node getAUrlPart() {
|
||||||
result = request.getArgument(0)
|
result = request.getArgument(0)
|
||||||
or
|
or
|
||||||
|
result = this.getAUrlPartFromConstructor()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a node that contributes to the URL of the request
|
||||||
|
* indirectly, through the constructor.
|
||||||
|
*/
|
||||||
|
private DataFlow::Node getAUrlPartFromConstructor() {
|
||||||
// Net::HTTP.new(...).get(...)
|
// Net::HTTP.new(...).get(...)
|
||||||
exists(API::Node new |
|
exists(API::Node new |
|
||||||
new = API::getTopLevelMember("Net").getMember("HTTP").getInstance() and
|
new = API::getTopLevelMember("Net").getMember("HTTP").getInstance() and
|
||||||
|
|||||||
Reference in New Issue
Block a user