Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Allow expecting a parameter to be nil during return_to verification.#70

Merged
dennisreimann merged 1 commit intoopenid:masterfrom
pierre-pretorius:master
Jan 27, 2014
Merged

Allow expecting a parameter to be nil during return_to verification.#70
dennisreimann merged 1 commit intoopenid:masterfrom
pierre-pretorius:master

Conversation

@pierre-pretorius
Copy link
Copy Markdown
Contributor

There was a minor openid change on Google's side that caused all our applications using the ruby-openid gem to fail when authorizing users via Google openid. After some debugging I determined the return_to parameter in the response from Google changed from:

{"user[email]"=>[""], "user[password]"=>[""], "user[identity_url]"=>["https://www.google.com/accounts/o8/id"]}

to:

{"user[email]"=>[], "user[password]"=>[], "user[identity_url]"=>["https://www.google.com/accounts/o8/id"]}

This causes the verify_return_to_args method to reject the response even though the rt_key (expected result) is nil.

if msg_val.nil?
  raise ProtocolError, "Message missing return_to argument '#{rt_key}'"
elsif msg_val != rt_val
  raise ProtocolError, ("Parameter '#{rt_key}' value "\
                                      "#{msg_val.inspect} does not match "\
                                      "return_to's value #{rt_val.inspect}")
end

Please accept my pull request that addresses this problem. It doesn't reject the response if the rt_key (expected result) is also nil.

dennisreimann added a commit that referenced this pull request Jan 27, 2014
Allow expecting a parameter to be nil during return_to verification.
@dennisreimann dennisreimann merged commit 457b2c5 into openid:master Jan 27, 2014
@dennisreimann
Copy link
Copy Markdown
Contributor

Thanks for your contribution - I just pulled in those changes and pushed v2.4.0 to rubygems :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants