Repository navigation
Remove CGI dependencies - #424
Merged
Merged
Conversation
pboling
approved these changes
Dec 2, 2026
pboling
left a comment
Member
There was a problem hiding this comment.
lib/oauth/request_proxy/action_controller_request.rb:53 still calls CGI.unescape. It should keep working on Ruby 4.0, since cgi/escape is still shipped. I can address that in a separate PR.
pboling
added a commit
that referenced
this pull request
Dec 3, 2026
Use OAuth::Helper.form_unescape, widen the CGI-independence spec to any CGI.* call, and add changelog entries for #424 and this change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ruby 4.0 no longer ships
CGI.parse. This removes the library's dependency on it.OAuth::Helper.parse_query(andform_unescape), a drop-in replacement forCGI.parse: splits on&/;, decodes+as a space, tolerates malformed%sequences, keeps the same encoding behavior, and returns a frozen empty default.CGI.parsecall inconsumer.rband the curb, em_http, net_http, rest_client and typhoeus request proxies, and drops theirrequire "cgi".Tests
parse_queryspecs, including a comparison against the realCGI.parse(values and encodings) when available.CGI.parsereappears inlib/.