ucenter_authcode 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ucenter_authcode.rb +1 -1
- metadata +2 -2
data/lib/ucenter_authcode.rb
CHANGED
@@ -50,7 +50,7 @@ module UCenter
|
|
50
50
|
end
|
51
51
|
|
52
52
|
result_time_valided = (result[0, 10] == '0'*10) || (result[0, 10].to_i - Time.now.to_i > 0)
|
53
|
-
result_string_valided = result[10, 16] ==
|
53
|
+
result_string_valided = result[10, 16] == md5("#{result[26..-1]}#{key_right}")[0, 16] # 重新加密和string对比验证
|
54
54
|
if (result_time_valided && result_string_valided)
|
55
55
|
return result[26..-1]
|
56
56
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ucenter_authcode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -19,7 +19,7 @@ extensions: []
|
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
21
|
- lib/ucenter_authcode.rb
|
22
|
-
homepage:
|
22
|
+
homepage: https://github.com/eoecn/ucenter_authcode
|
23
23
|
licenses: []
|
24
24
|
post_install_message:
|
25
25
|
rdoc_options: []
|