signauth 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,5 @@
1
1
  require 'uri'
2
+ require 'cgi'
2
3
 
3
4
  module Signauth
4
5
  module Signature
@@ -19,13 +20,13 @@ module Signauth
19
20
  [
20
21
  method.to_s.upcase,
21
22
  host.to_s.downcase,
22
- path.to_s,
23
+ CGI.escape(path.to_s),
23
24
  params.sort.collect { |n, v| encoded(n, v) }.join('&'),
24
25
  ].join("\n")
25
26
  end
26
27
 
27
28
  def encoded(name, value)
28
- "#{URI.escape(name.to_s)}=#{URI.escape(value.to_s)}"
29
+ "#{CGI.escape(name.to_s)}=#{CGI.escape(value.to_s)}"
29
30
  end
30
31
 
31
32
  def validate_timestamp(timestamp, skew)
@@ -1,3 +1,3 @@
1
1
  module Signauth
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-02 00:00:00.000000000 Z
12
+ date: 2012-12-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -84,7 +84,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
84
  version: '0'
85
85
  segments:
86
86
  - 0
87
- hash: -851840237
87
+ hash: -89774867
88
88
  required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  version: '0'
94
94
  segments:
95
95
  - 0
96
- hash: -851840237
96
+ hash: -89774867
97
97
  requirements: []
98
98
  rubyforge_project:
99
99
  rubygems_version: 1.8.24