You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is one problem that I noticed in ruby 1.8 (ruby 1.9 has ordered hash so it's must be ok). Problem occurs when signing nested hashes (for nested hashes ordering does not work), for example:
Of course, in Rails apps enough to make their own small monkeypatch, but I know that your lovely gem is used even outside of the ruby-world... and even outside english-speaking world, as you can see )
The text was updated successfully, but these errors were encountered:
Hi Hariton. Thanks for the comments - I was just wondering what you're using signature for and why you need nested query parameters?
It's certainly the case that signature doesn't currently support nested parameter hashes - just {string -> string} ones. The keys are sorted so there is only one possible representation for a hash. Ruby 1.9 doesn't help in this respect, because the hash is merely sorted by insertion order, not alphanumeric by key.
I'm quite happy to accept a patch to add nested query hashing as long as the signature format is backwards compatible :)
There is one problem that I noticed in ruby 1.8 (ruby 1.9 has ordered hash so it's must be ok). Problem occurs when signing nested hashes (for nested hashes ordering does not work), for example:
I think the easiest way - change this code:
with this one:
Before that, dragging a couple of methods from activesupport:
etc (all from to_param.rb and to_query.rb)
Of course, in Rails apps enough to make their own small monkeypatch, but I know that your lovely gem is used even outside of the ruby-world... and even outside english-speaking world, as you can see )
The text was updated successfully, but these errors were encountered: