mirror of
https://github.com/samsonjs/simple_oauth.git
synced 2026-03-25 08:45:54 +00:00
Updated parameter and attribute sorting during normalization to behave consistently across Ruby versions 1.8.7 and 1.9.2.
This commit is contained in:
parent
fb19df165f
commit
cc7510f6a5
1 changed files with 2 additions and 2 deletions
|
|
@ -69,7 +69,7 @@ module SimpleOAuth
|
|||
|
||||
private
|
||||
def normalized_attributes
|
||||
signed_attributes.sort_by(&:to_s).map{|k,v| %(#{k}="#{self.class.encode(v)}") }.join(', ')
|
||||
signed_attributes.sort_by{|k,v| k.to_s }.map{|k,v| %(#{k}="#{self.class.encode(v)}") }.join(', ')
|
||||
end
|
||||
|
||||
def signed_attributes
|
||||
|
|
@ -103,7 +103,7 @@ module SimpleOAuth
|
|||
end
|
||||
|
||||
def normalized_params
|
||||
signature_params.sort_by(&:to_s).map{|p| p.map{|v| self.class.encode(v) }.join('=') }.join('&')
|
||||
signature_params.map{|p| p.map{|v| self.class.encode(v) } }.sort.map{|p| p.join('=') }.join('&')
|
||||
end
|
||||
|
||||
def signature_params
|
||||
|
|
|
|||
Loading…
Reference in a new issue