cookie_crypt 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cookie_crypt/controllers/helpers.rb +5 -0
- data/lib/cookie_crypt/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84e632676b78ea76d8a02e60db8662e89a2d3d7f
|
4
|
+
data.tar.gz: 395894fa59ff78d985228ab89d4a102fd421841f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fac98960b7f25f2c419e80851834c0f2bfbdf69567058fd22eec5ad2fc7b75a4ee19f51e7da5d6054465837edaf86eeabf88ad928d9834dfcdb9a3ae13ea0e3
|
7
|
+
data.tar.gz: 1e045a35ed0deb4071c665824116b3efc8636e2f8be396ec6f055923d4373a7743b2d9b5c9387263ffc4b3a9178c2890103f4c54bcd3ef685cd5f2d72aba6683
|
@@ -121,6 +121,8 @@ module CookieCrypt
|
|
121
121
|
session[:cyclemod] = 0
|
122
122
|
elsif resource.cookie_crypt_attempts_count != 0 && resource.cookie_crypt_attempts_count%resource.class.cycle_question_on_fail_count == 0
|
123
123
|
session[:cyclemod] += 1
|
124
|
+
else #logout then log back in at a future time?
|
125
|
+
session[:cyclemod] = 0
|
124
126
|
end
|
125
127
|
|
126
128
|
session[:cyclemod] = 0 if session[:cyclemod]+resource.security_cycle > hash.keys.count/2
|
@@ -136,10 +138,13 @@ module CookieCrypt
|
|
136
138
|
end
|
137
139
|
session[:cyclemod] = r
|
138
140
|
|
141
|
+
else #logout then log back in at a future time?
|
142
|
+
session[:cyclemod] = 0
|
139
143
|
end
|
140
144
|
end
|
141
145
|
|
142
146
|
def update_resource_cycle hash
|
147
|
+
#reset or rollover the cycle number
|
143
148
|
if resource.class.cookie_crypt_auth_through == :one_question_cyclical ||
|
144
149
|
resource.class.cookie_crypt_auth_through == :two_questions_cyclical
|
145
150
|
|
data/lib/cookie_crypt/version.rb
CHANGED