caren-api 0.9.4 → 0.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/caren-api.gemspec +1 -1
- data/lib/caren/caren.rb +6 -2
- metadata +2 -2
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.9.
|
|
1
|
+
0.9.6
|
data/caren-api.gemspec
CHANGED
data/lib/caren/caren.rb
CHANGED
|
@@ -208,8 +208,12 @@ module Caren
|
|
|
208
208
|
return CGI.escape(Base64.encode64(digest))
|
|
209
209
|
end
|
|
210
210
|
|
|
211
|
-
def verify_string provided_string, expected_string, key=self.caren_public_key
|
|
212
|
-
|
|
211
|
+
def verify_string provided_string, expected_string, key=self.caren_public_key, options={}
|
|
212
|
+
if options[:skip_cgi_unescape]
|
|
213
|
+
provided_string = Base64.decode64(provided_string.to_s)
|
|
214
|
+
else
|
|
215
|
+
provided_string = Base64.decode64(CGI.unescape(provided_string.to_s))
|
|
216
|
+
end
|
|
213
217
|
DIGEST_ALGORITHMS.map{ |algorithm| key.verify( algorithm, provided_string, expected_string.strip ) }.any?
|
|
214
218
|
end
|
|
215
219
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: caren-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.6
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -269,7 +269,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
269
269
|
version: '0'
|
|
270
270
|
segments:
|
|
271
271
|
- 0
|
|
272
|
-
hash:
|
|
272
|
+
hash: 2886189830791455687
|
|
273
273
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
274
274
|
none: false
|
|
275
275
|
requirements:
|