File tree Expand file tree Collapse file tree 10 files changed +17
-17
lines changed Expand file tree Collapse file tree 10 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -485,10 +485,10 @@ module HTTP {
485
485
DataFlow:: Node getResponseBody ( ) { result = super .getResponseBody ( ) }
486
486
487
487
/**
488
- * Gets a node that contributes to the URL of the request.
488
+ * Gets a data-flow node that contributes to the URL of the request.
489
489
* Depending on the framework, a request may have multiple nodes which contribute to the URL.
490
490
*/
491
- DataFlow:: Node getURL ( ) { result = super .getURL ( ) }
491
+ DataFlow:: Node getAUrlPart ( ) { result = super .getAUrlPart ( ) }
492
492
493
493
/** Gets a string that identifies the framework used for this request. */
494
494
string getFramework ( ) { result = super .getFramework ( ) }
@@ -515,11 +515,11 @@ module HTTP {
515
515
/** Gets a node which returns the body of the response */
516
516
abstract DataFlow:: Node getResponseBody ( ) ;
517
517
518
- /**
519
- * Gets a node that contributes to the URL of the request.
520
- * Depending on the framework, a request may have multiple nodes which contribute to the URL.
521
- */
522
- abstract DataFlow:: Node getURL ( ) ;
518
+ /**
519
+ * Gets a data-flow node that contributes to the URL of the request.
520
+ * Depending on the framework, a request may have multiple nodes which contribute to the URL.
521
+ */
522
+ abstract DataFlow:: Node getAUrlPart ( ) ;
523
523
524
524
/** Gets a string that identifies the framework used for this request. */
525
525
abstract string getFramework ( ) ;
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ class ExconHttpRequest extends HTTP::Client::Request::Range {
52
52
53
53
override DataFlow:: Node getResponseBody ( ) { result = requestNode .getAMethodCall ( "body" ) }
54
54
55
- override DataFlow:: Node getURL ( ) {
55
+ override DataFlow:: Node getAUrlPart ( ) {
56
56
// For one-off requests, the URL is in the first argument of the request method call.
57
57
// For connection re-use, the URL is split between the first argument of the `new` call
58
58
// and the `path` keyword argument of the request method call.
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ class FaradayHttpRequest extends HTTP::Client::Request::Range {
45
45
46
46
override DataFlow:: Node getResponseBody ( ) { result = requestNode .getAMethodCall ( "body" ) }
47
47
48
- override DataFlow:: Node getURL ( ) {
48
+ override DataFlow:: Node getAUrlPart ( ) {
49
49
result = requestUse .getArgument ( 0 ) or
50
50
result = connectionUse .( DataFlow:: CallNode ) .getArgument ( 0 ) or
51
51
result = connectionUse .( DataFlow:: CallNode ) .getKeywordArgument ( "url" )
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class HttpClientRequest extends HTTP::Client::Request::Range {
36
36
this = requestUse .asExpr ( ) .getExpr ( )
37
37
}
38
38
39
- override DataFlow:: Node getURL ( ) { result = requestUse .getArgument ( 0 ) }
39
+ override DataFlow:: Node getAUrlPart ( ) { result = requestUse .getArgument ( 0 ) }
40
40
41
41
override DataFlow:: Node getResponseBody ( ) {
42
42
// The `get_content` and `post_content` methods return the response body as
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class HttpartyRequest extends HTTP::Client::Request::Range {
35
35
this = requestUse .asExpr ( ) .getExpr ( )
36
36
}
37
37
38
- override DataFlow:: Node getURL ( ) { result = requestUse .getArgument ( 0 ) }
38
+ override DataFlow:: Node getAUrlPart ( ) { result = requestUse .getArgument ( 0 ) }
39
39
40
40
override DataFlow:: Node getResponseBody ( ) {
41
41
// If HTTParty can recognise the response type, it will parse and return it
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ class NetHttpRequest extends HTTP::Client::Request::Range {
51
51
* Gets the node representing the URL of the request.
52
52
* Currently unused, but may be useful in future, e.g. to filter out certain requests.
53
53
*/
54
- override DataFlow:: Node getURL ( ) { result = request .getArgument ( 0 ) }
54
+ override DataFlow:: Node getAUrlPart ( ) { result = request .getArgument ( 0 ) }
55
55
56
56
override DataFlow:: Node getResponseBody ( ) { result = responseBody }
57
57
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ class OpenUriRequest extends HTTP::Client::Request::Range {
32
32
this = requestUse .asExpr ( ) .getExpr ( )
33
33
}
34
34
35
- override DataFlow:: Node getURL ( ) { result = requestUse .getArgument ( 0 ) }
35
+ override DataFlow:: Node getAUrlPart ( ) { result = requestUse .getArgument ( 0 ) }
36
36
37
37
override DataFlow:: Node getResponseBody ( ) {
38
38
result = requestNode .getAMethodCall ( [ "read" , "readlines" ] )
@@ -65,7 +65,7 @@ class OpenUriKernelOpenRequest extends HTTP::Client::Request::Range {
65
65
this = requestUse .asExpr ( ) .getExpr ( )
66
66
}
67
67
68
- override DataFlow:: Node getURL ( ) { result = requestUse .getArgument ( 0 ) }
68
+ override DataFlow:: Node getAUrlPart ( ) { result = requestUse .getArgument ( 0 ) }
69
69
70
70
override DataFlow:: CallNode getResponseBody ( ) {
71
71
result .asExpr ( ) .getExpr ( ) .( MethodCall ) .getMethodName ( ) in [ "read" , "readlines" ] and
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class RestClientHttpRequest extends HTTP::Client::Request::Range {
38
38
)
39
39
}
40
40
41
- override DataFlow:: Node getURL ( ) {
41
+ override DataFlow:: Node getAUrlPart ( ) {
42
42
result = requestUse .getKeywordArgument ( "url" )
43
43
or
44
44
result = requestUse .getArgument ( 0 ) and
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class TyphoeusHttpRequest extends HTTP::Client::Request::Range {
26
26
this = requestUse .asExpr ( ) .getExpr ( )
27
27
}
28
28
29
- override DataFlow:: Node getURL ( ) { result = requestUse .getArgument ( 0 ) }
29
+ override DataFlow:: Node getAUrlPart ( ) { result = requestUse .getArgument ( 0 ) }
30
30
31
31
override DataFlow:: Node getResponseBody ( ) { result = requestNode .getAMethodCall ( "body" ) }
32
32
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ module ServerSideRequestForgery {
43
43
44
44
/** The URL of an HTTP request, considered as a sink. */
45
45
class HttpRequestAsSink extends Sink {
46
- HttpRequestAsSink ( ) { exists ( HTTP:: Client:: Request req | req .getURL ( ) = this ) }
46
+ HttpRequestAsSink ( ) { exists ( HTTP:: Client:: Request req | req .getAUrlPart ( ) = this ) }
47
47
}
48
48
49
49
/** A string interpolation with a fixed prefix, considered as a flow sanitizer. */
You can’t perform that action at this time.
0 commit comments