ruby-openid icon indicating copy to clipboard operation
ruby-openid copied to clipboard

server: fix param length check for decode

Open tsaitgaist opened this issue 4 years ago • 1 comments

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?"

tsaitgaist avatar Oct 27 '21 16:10 tsaitgaist

if possible, please do a release since this is a crashing bug fix (not just a feature)

tsaitgaist avatar Oct 27 '21 16:10 tsaitgaist

This repo is being archived. Closing PR.

timcappalli avatar Jul 24 '23 17:07 timcappalli