Skip to content
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

Bug/1 server decode #2

Merged
merged 2 commits into from
Sep 3, 2024
Merged

Bug/1 server decode #2

merged 2 commits into from
Sep 3, 2024

Conversation

pboling
Copy link
Member

@pboling pboling commented Aug 31, 2024

fixes #1

pboling and others added 2 commits September 3, 2024 12:29
in the redmine plugin buri17/redmine_openid_provider, the following call:
app/controllers/open_id_provider_controller.rb:28
open_id_request = server.decode_request(params)

causes the following exception:
NoMethodError (undefined method `length' for #<ActionController::Parameters:0x00007f3a14e70608>)

params is a ActionController::Parameters.
in rails 4.x ActionController::Parameters was a Hash and had the length method.
in rails 5.x ActionController::Parameters is an object and does not have the
length method.
instead the empty? method can be used.

this fix replaces "params.length == 0" with the equivalent "params.empty?"
@pboling pboling force-pushed the bug/1-server-decode branch from 7a24a55 to c4bb12f Compare September 3, 2024 18:29
@pboling pboling merged commit 1f24002 into master Sep 3, 2024
2 checks passed
@pboling pboling deleted the bug/1-server-decode branch September 3, 2024 18:46
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.

server: fix param length check for decode
2 participants