openid/ruby-openid — pull request #54 by cbrunsdon (2013-05-07 21:52:12+00:00)
Title: Change all spaces to + signs in message sigs

Okay, I don't necessarily think this should be merged outright, but I want a place to have this discussion.

For the last few months, we've been getting "invalid credentials" errors in our apps randomly. I finally sat down to debug the errors, and found out they occur when the base64 encoding of our messages have spaces in them.

The local calculation of signatures would calculate with +'s included (which are valid in base64), but the openid response from google would have had its variables urldecoded to switch +'s to spaces.

This pull request fixes our problem, but hardly seems like an appropriate solution.

```ruby
assoc.get_message_signature(message)
=> "SnIlSYBUJ+z0hrkNe03h4A4v+ys="
assoc.check_message_signature(@message)
=> false
message.get_arg(OPENID_NS, 'sig')
=> "SnIlSYBUJ z0hrkNe03h4A4v ys="
```