tolq-api 0.3.0 → 0.4.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79808429da5819b754b3ace0836baff58d5ff9a3
4
- data.tar.gz: 4708a7db5757288b8ccff4ab5d41132aa6da414c
3
+ metadata.gz: 66c210013f56f23ef3c586f7ab567555c3dff938
4
+ data.tar.gz: 1d5b81afa540594efac4a1593f9965934a7a4903
5
5
  SHA512:
6
- metadata.gz: b68bfd086a1dacd994a203db2babf9f762057aa103e2f8a4898a41994f9413167794500c370feee08adc95bdc42ce8b5c174d66ad0248004aaeaadf613b18613
7
- data.tar.gz: 947ec723d387be9512f1c48d65bd20bf2de23cc5e87843636771555e4c8a24fd80faeb115c1c859632f0bcaf831b8f7b37179e959bec01a3b0381234ae0fa5df
6
+ metadata.gz: d10c7b1fd61ff0c6c566de8e29cef864051fe61149d89b75a36ff3ba679718c18546cfd6ba885fb80229eb9959576ff80d016825e88e592522c71f9329205412
7
+ data.tar.gz: 7418eeaaaf964393c29e9dfbc484b479307a58471f87a57afdf2d77e98efd99c1560a621df65a873a237bfe1bc5ac6c3ace9dd2a1462cb9265eb62c41cfd7408
@@ -1,2 +1,5 @@
1
+ # 0.4.0
2
+ * Critical fix for HMAC signature verification, otherwise might use wrong encoding
3
+
1
4
  # 0.3.0
2
5
  * Added HMAC signature verification for callbacks
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tolq-api (0.2.0)
4
+ tolq-api (0.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -37,4 +37,4 @@ DEPENDENCIES
37
37
  webmock (~> 1.24.6)
38
38
 
39
39
  BUNDLED WITH
40
- 1.11.2
40
+ 1.12.5
@@ -30,7 +30,7 @@ module Tolq
30
30
  # @param signature [String] A sha1 encoded HMAC signature including the 'sha1=' prefix
31
31
  # @param payload [String] The body of the payload as a string
32
32
  def valid_signature?(signature, payload)
33
- payload_signature = 'sha1=' + OpenSSL::HMAC.digest('sha1', self.key, payload)
33
+ payload_signature = 'sha1=' + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), self.key, payload)
34
34
  payload_signature == signature
35
35
  end
36
36
 
@@ -1,5 +1,5 @@
1
1
  module Tolq
2
2
  module Api
3
- VERSION = '0.3.0'.freeze
3
+ VERSION = '0.4.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tolq-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timon Vonk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-25 00:00:00.000000000 Z
11
+ date: 2016-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -129,4 +129,3 @@ signing_key:
129
129
  specification_version: 4
130
130
  summary: A gem that wraps the Tolq.com API
131
131
  test_files: []
132
- has_rdoc: