Skip to content

Commit dea5036

Browse files
committed
Ruby: Update for Http concept changes
1 parent d9487a0 commit dea5036

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

ruby/ql/lib/codeql/ruby/frameworks/ActiveStorage.qll

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ module ActiveStorage {
8080
/**
8181
* Method calls on `ActiveStorage::Blob` that send HTTP requests.
8282
*/
83-
private class BlobRequestCall extends HTTP::Client::Request::Range {
83+
private class BlobRequestCall extends Http::Client::Request::Range {
8484
BlobRequestCall() {
8585
this =
8686
[
@@ -100,16 +100,20 @@ module ActiveStorage {
100100
|
101101
c
102102
)
103-
].asExpr().getExpr()
103+
]
104104
}
105105

106106
override string getFramework() { result = "activestorage" }
107107

108-
override DataFlow::Node getResponseBody() { result.asExpr().getExpr() = this }
108+
override DataFlow::Node getResponseBody() { result = this }
109109

110110
override DataFlow::Node getAUrlPart() { none() }
111111

112-
override predicate disablesCertificateValidation(DataFlow::Node disablingNode) { none() }
112+
override predicate disablesCertificateValidation(
113+
DataFlow::Node disablingNode, DataFlow::Node argumentOrigin
114+
) {
115+
none()
116+
}
113117
}
114118

115119
/**

ruby/ql/test/library-tests/frameworks/active_storage/ActiveStorage.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import codeql.ruby.frameworks.ActiveStorage
66

77
query predicate attachmentInstances(ActiveStorage::AttachmentInstance n) { any() }
88

9-
query predicate httpRequests(HTTP::Client::Request r, string framework, DataFlow::Node responseBody) {
9+
query predicate httpRequests(Http::Client::Request r, string framework, DataFlow::Node responseBody) {
1010
r.getFramework() = framework and r.getResponseBody() = responseBody
1111
}
1212

0 commit comments

Comments
 (0)