Skip to content

Commit 982d868

Browse files
committed
reduce login failure thresholds for CAPTCHA and full block (IDP-1624)
1 parent 53244f9 commit 982d868

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -616,11 +616,11 @@ SilAuth will rate limit failed logins by username and by every untrusted IP
616616
address from a login attempt.
617617

618618
##### tl;dr ("the short version")
619-
If there have been more than 10 failed logins for a given username (or IP
619+
If there have been more than 5 failed logins for a given username (or IP
620620
address) within the past hour, a captcha will be included in the webpage. The
621621
user may or may not have to directly interact with the captcha, though.
622622

623-
If there have been more than 50 failed logins for that username (or IP address)
623+
If there have been more than 20 failed logins for that username (or IP address)
624624
within the past hour, logins for that username (or IP address) will be blocked
625625
for up to an hour.
626626

@@ -646,10 +646,10 @@ also actual tests that are run to ensure those descriptions are correct.
646646

647647
##### Example 1
648648

649-
- If `BLOCK_AFTER_NTH_FAILED_LOGIN` is 50, and
650-
- if `REQUIRE_CAPTCHA_AFTER_NTH_FAILED_LOGIN` is 10, and
649+
- If `BLOCK_AFTER_NTH_FAILED_LOGIN` is 20, and
650+
- if `REQUIRE_CAPTCHA_AFTER_NTH_FAILED_LOGIN` is 5, and
651651
- if there have been 4 failed login attempts for `john_smith`, and
652-
- there have been 10 failed login attempts from `11.22.33.44`, and
652+
- there have been 5 failed login attempts from `11.22.33.44`, and
653653
- there have been 3 failed login attempts from `192.168.1.2`, and
654654
- someone tries to login as `john_smith` from `192.168.1.2` and their request
655655
goes through a proxy at `11.22.33.44`, then
@@ -658,7 +658,7 @@ also actual tests that are run to ensure those descriptions are correct.
658658
##### Example 2
659659

660660
- However, if all of the above is true, but
661-
- there have now been 55 failed login attempts from `11.22.33.44`, then
661+
- there have now been 25 failed login attempts from `11.22.33.44`, then
662662
- any request involving that IP address will be blocked for 25 seconds after
663663
the most recent of those failed logins.
664664

modules/silauth/src/Auth/Source/auth/Authenticator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
*/
1818
class Authenticator
1919
{
20-
const REQUIRE_CAPTCHA_AFTER_NTH_FAILED_LOGIN = 10;
21-
const BLOCK_AFTER_NTH_FAILED_LOGIN = 50;
20+
const REQUIRE_CAPTCHA_AFTER_NTH_FAILED_LOGIN = 5;
21+
const BLOCK_AFTER_NTH_FAILED_LOGIN = 20;
2222
const MAX_SECONDS_TO_BLOCK = 3600; // 3600 seconds = 1 hour
2323

2424
private ?AuthError $authError = null;

0 commit comments

Comments
 (0)