Content-Length: 294366 | pFad | http://github.com/github/codeql/pull/20101/#start-of-content

CE Fix #19294, Ruby NetHttpRequest improvements by mschwager · Pull Request #20101 · github/codeql · GitHub
Skip to content

Fix #19294, Ruby NetHttpRequest improvements #20101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mschwager
Copy link

This PR makes 3 improvements to the NetHttpRequest class:

@mschwager mschwager requested a review from a team as a code owner July 21, 2025 19:21
@github-actions github-actions bot added the Ruby label Jul 21, 2025
Comment on lines +20 to +24
*
* # connection re-use
* Net::HTTP.start("http://example.com") do |http|
* http.get("/")
* end
Copy link
Author

@mschwager mschwager Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that technically Net::HTTP.new does not open/reuse connections/sessions: https://docs.ruby-lang.org/en/master/Net/HTTP.html#method-c-new

Comment on lines +31 to +33
http = Net::HTTP.new("https://example.com")
root_get = Net::HTTP::Get.new("/")
http.request(root_get)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case was already detected without the above code modifications, but I wanted to make sure that request objects are also detected correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/github/codeql/pull/20101/#start-of-content

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy