login-control 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/login_control_view_helper.rb +4 -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: 79173cf05ae33b909d18f5d0133cc5f5923a441eaac6a97c46f7014954366b78
|
4
|
+
data.tar.gz: 4b397e66649e66d8f5e46f396869cf7dd509fbbff0fdba3f03fd350dc70d49c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b76a4df603b6c1ae5fef560f30fa75f4727a8775109c1e4546a23c3a19d4cb10900680d4b2a8f22ee2da5112bfad9dbce48f8fc49c7ef8a8a608fa8275a073a8
|
7
|
+
data.tar.gz: 00e6e60b838174b6d380757bb76855c403b450bca000fab74820b93269fbbce3d1790927cd110f3fc39f34c3c27ecff00847750c52059db473392d035a886ae3
|
@@ -26,7 +26,10 @@ module LoginControlViewHelper
|
|
26
26
|
retry_after_seconds = (Rails.configuration.x.login_control.retry_after_seconds || 30)
|
27
27
|
logger.info "LoginControlViewHelper.captcha_tag? => #{rec.attempts.to_i}. attempt (config.x.attempts_allowed: #{attempts_allowed})" if debug
|
28
28
|
|
29
|
-
if rec.
|
29
|
+
if rec.sign_in_success.to_i == 0
|
30
|
+
captcha_requested = true
|
31
|
+
logger.info "LoginControlViewHelper.captcha_tag? => captcha requested: because no successful login yet" if debug
|
32
|
+
elsif rec.attempts == 1
|
30
33
|
captcha_requested = false
|
31
34
|
logger.info "LoginControlViewHelper.captcha_tag? => captcha NOT requested: because first attempt after successful login" if debug
|
32
35
|
elsif rec.attempts.to_i <= attempts_allowed
|