Skip to content

Commit 64a5c5d

Browse files
committed
Ruby: Keep getURL predicate for easier deprecation
Notice that we still don't fully keep our standard deprecation support, since the new `getAUrlPart` is still abstract, and therefore will cause compile errors if not implemented.
1 parent 9254b29 commit 64a5c5d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

ruby/ql/lib/codeql/ruby/Concepts.qll

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,14 @@ module HTTP {
484484
/** Gets a node which returns the body of the response */
485485
DataFlow::Node getResponseBody() { result = super.getResponseBody() }
486486

487+
/**
488+
* DEPRECATED: Use `getAUrlPart` instead.
489+
*
490+
* Gets a node that contributes to the URL of the request.
491+
* Depending on the framework, a request may have multiple nodes which contribute to the URL.
492+
*/
493+
deprecated DataFlow::Node getURL() { result = super.getURL() }
494+
487495
/**
488496
* Gets a data-flow node that contributes to the URL of the request.
489497
* Depending on the framework, a request may have multiple nodes which contribute to the URL.
@@ -515,6 +523,14 @@ module HTTP {
515523
/** Gets a node which returns the body of the response */
516524
abstract DataFlow::Node getResponseBody();
517525

526+
/**
527+
* DEPRECATED: overwrite `getAUrlPart` instead.
528+
*
529+
* Gets a node that contributes to the URL of the request.
530+
* Depending on the framework, a request may have multiple nodes which contribute to the URL.
531+
*/
532+
deprecated DataFlow::Node getURL() { none() }
533+
518534
/**
519535
* Gets a data-flow node that contributes to the URL of the request.
520536
* Depending on the framework, a request may have multiple nodes which contribute to the URL.

0 commit comments

Comments
 (0)