Skip to content

Drop last CGI usage (ActionController proxy) - #425

Merged
pboling merged 2 commits into
mainfrom
fix/cgi-unescape-action-controller
Dec 3, 2026
Merged

pboling merged 2 commits into
mainfrom
fix/cgi-unescape-action-controller

Conversation

@pboling

@pboling pboling commented Dec 2, 2026

Copy link
Copy Markdown
Member

Follow-up to #424.

  • ActionControllerRequest now uses OAuth::Helper.form_unescape instead of CGI.unescape, so lib/ no longer depends on CGI at all.
  • The CGI-independence spec now fails on any CGI.* call in lib/, not just CGI.parse.
  • Changelog entries for Remove CGI dependencies #424 and this PR.

Note: the ActionController spec is skipped in my environment (actionpack not installed), so CI should confirm that path.

Built with Cloudroom

Use OAuth::Helper.form_unescape, widen the CGI-independence spec to any
CGI.* call, and add changelog entries for #424 and this change.
Copilot AI balanced review requested due to automatic review settings December 2, 2026 19:43
@coveralls

coveralls commented Dec 2, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 47096032039

Coverage remained the same at 82.616%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 990
Covered Lines: 873
Line Coverage: 88.18%
Relevant Branches: 287
Covered Branches: 182
Branch Coverage: 63.41%
Branches in Coverage %: Yes
Coverage Strength: 98.05 hits per line

💛 - Coveralls

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The existing ActionController spec checks method, URI, and parameters, but never exercises the decoder change. Signature handling of query/form inputs containing +, %2B, malformed escapes, and non-ASCII bytes therefore lacks regression coverage through ActionControllerRequest#parameters_for_signature or signature normalization.

1 open issue
What changed in this PR

Completes the CGI removal started in #424 by replacing the OAuth ActionController proxy’s final CGI call.

Changes:

  • Uses OAuth::Helper.form_unescape for signature parameter decoding.
  • Broadens the source guard to detect CGI.* calls.
  • Documents both CGI-removal changes.
File Description
spec/​integration/​oauth_cgi_independence_spec.rb Broadens the CGI usage guard.
lib/​oauth/​request_proxy/​action_controller_request.rb Replaces CGI.unescape with the internal helper.
CHANGELOG.md Records helper additions and compatibility fixes.

Review effort: Balanced

@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Health
oauth 88% 63% ➖
Summary 88% (873 / 990) 63% (182 / 287) ➖

Minimum allowed line rate is 80%

@pboling
pboling merged commit 21ec431 into main Dec 3, 2026
30 checks passed
@pboling
pboling deleted the fix/cgi-unescape-action-controller branch December 3, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants