siwe 1.1.0 → 1.1.1
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 +4 -4
- data/Gemfile.lock +2 -2
- data/lib/siwe/exceptions.rb +1 -1
- data/lib/siwe/message.rb +3 -0
- data/lib/siwe/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: 1b93dcc0ece62bd6bdd3316e51661198c5b4f4b5a8433c355bcae8a51997b183
|
|
4
|
+
data.tar.gz: f5b5720ea3a8de09d52f1896b6371159c98bad1385e8ab8dae2420e037e7e6bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 02626d246f7d5cfb189057feb2619cdcaaf0271d52c70be86f77e9c04ef214974ca2ce9506565a2f9c927bcceb2dede81e9c2e7c57b629312c0e966bf110d5e4
|
|
7
|
+
data.tar.gz: 3bd251a0027c2cb831d90e6fad7b920731c5f19553472ce1219216daac97727e7bf939fc859a994fc9eeed672789ed67af0d0c23f737b95334d8446d3141fc13
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
siwe (1.
|
|
4
|
+
siwe (1.1.0)
|
|
5
5
|
eth (~> 0.5.1)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -22,7 +22,7 @@ GEM
|
|
|
22
22
|
ffi-compiler (1.0.1)
|
|
23
23
|
ffi (>= 1.0.0)
|
|
24
24
|
rake
|
|
25
|
-
ipaddr (1.2.
|
|
25
|
+
ipaddr (1.2.4)
|
|
26
26
|
jaro_winkler (1.5.4)
|
|
27
27
|
keccak (1.3.0)
|
|
28
28
|
konstructor (1.0.2)
|
data/lib/siwe/exceptions.rb
CHANGED
|
@@ -10,7 +10,7 @@ module Siwe
|
|
|
10
10
|
|
|
11
11
|
# Used when the address does not conform to EIP-55 or is invalid.
|
|
12
12
|
class InvalidAddress < StandardError
|
|
13
|
-
def initialize(msg = "
|
|
13
|
+
def initialize(msg = "Address does not conform to EIP-55 or is invalid.")
|
|
14
14
|
super
|
|
15
15
|
end
|
|
16
16
|
end
|
data/lib/siwe/message.rb
CHANGED
|
@@ -162,6 +162,9 @@ module Siwe
|
|
|
162
162
|
|
|
163
163
|
raise Siwe::InvalidSignature if signature.empty?
|
|
164
164
|
|
|
165
|
+
raise Siwe::InvalidAddress unless @address.eql?(Eth::Address.new(@address).to_s)
|
|
166
|
+
|
|
167
|
+
puts "whatever"
|
|
165
168
|
begin
|
|
166
169
|
pub_key = Eth::Signature.personal_recover prepare_message, signature
|
|
167
170
|
signature_address = Eth::Util.public_key_to_address pub_key
|
data/lib/siwe/version.rb
CHANGED