telegram-ruby 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/telegram/bot/login.rb +1 -1
- data/lib/telegram/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be3660edae8b1987587e1ae17050608f0bf670f60e40b194b5d4df7df1da147d
|
4
|
+
data.tar.gz: bde63464aad0dc5a12e336854dfffcead3bab885c66b3ce161706d3b778b6fc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dde2f3cf1e21ef68c93aa2d3ec61240da85556b1674b9cc5329c1e1b286ef6234efaa681dea1f30d65b18d7b3275c116030c6c8d78a89b02881e09c5c5fbe1c1
|
7
|
+
data.tar.gz: 5b08bbe0d5e61a4ee73a769d8ce8bf28c91b7e85225551d8da2311f50c9802d1ad1b6cb66e016ecf0ef4a8d2064a9988a88ba576eef67f3f09d1110135ab8ce5
|
data/lib/telegram/bot/login.rb
CHANGED
@@ -7,7 +7,7 @@ module Telegram::Bot
|
|
7
7
|
auth_data = auth_data.slice(:auth_date, :first_name, :id, :last_name, :photo_url, :username)
|
8
8
|
check_string = auth_data.map {|k, v| "#{k}=#{v}" }.sort.join("\n")
|
9
9
|
|
10
|
-
secret_key = OpenSSL::Digest::SHA256.new.digest(Bot.configuration.token)
|
10
|
+
secret_key = OpenSSL::Digest::SHA256.new.digest(Telegram::Bot.configuration.token)
|
11
11
|
hash = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), secret_key, check_string)
|
12
12
|
|
13
13
|
raise Telegram::Bot::LoginError.new('Data is NOT from Telegram') if (hash.casecmp(check_hash) != 0)
|
data/lib/telegram/version.rb
CHANGED