Skip to content

Commit dada2fb

Browse files
authored
callback: take last numeric as timestamp (#22)
fix #21
1 parent db34570 commit dada2fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/omniauth-ethereum.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def request_phase
4343

4444
def callback_phase
4545
message = request.params["eth_message"]
46-
unix_time = message.scan(/\d+/).first.to_i
46+
unix_time = message.scan(/\d+/).last.to_i
4747
ten_min = 10 * 60
4848
return fail!(:invalid_time) unless unix_time + ten_min >= now && unix_time - ten_min <= now
4949

0 commit comments

Comments
 (0)