Permalink
Browse files

Fixed bug in the validateRequest method which prevented corrected val…

…idation
  • Loading branch information...
1 parent 03462ce commit 823db71ce134e11f4c9abc923ae4b15774a56dc9 Kyle Conroy committed May 22, 2010
Showing with 12 additions and 5 deletions.
  1. +10 −3 Changelog
  2. +1 −1 Rakefile
  3. +1 −1 lib/twiliolib.rb
View
@@ -1,3 +1,10 @@
-Changelog for Twilio Ruby Gem
-=================================================
-0.1.2 - Renamed gem
+# Changelog for Twilio Ruby Gem
+
+## 2.0.5
+
+* Fixed bug which caused validateRequest to fail
+
+## 0.1.2
+
+* Renamed gem
+
View
@@ -3,7 +3,7 @@ require 'rake/gempackagetask'
spec = Gem::Specification.new do |s|
s.name = "twiliolib"
- s.version = "2.0.4"
+ s.version = "2.0.5"
s.author = "Twilio"
s.email = "help@twilio.com"
s.homepage = "http://www.twilio.com/docs"
View
@@ -382,7 +382,7 @@ def validateRequest(signature, url, params = {})
data = data + pkey[0]+pkey[1]
end
digest = OpenSSL::Digest::Digest.new('sha1')
- expected = Base64.encode64(OpenSSL::HMAC.digest(digest, @id, data)).strip
+ expected = Base64.encode64(OpenSSL::HMAC.digest(digest, @token, data)).strip
return expected == signature
end
end

0 comments on commit 823db71

Please sign in to comment.