You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When lockout is enabled, enhanced response error messages allow an
attacker to enumerate valid usernames. Change adds new configuration
option to disable username enumeration by returning the same error
message for both invalid usernames and locked out accounts.
The option is enabled by default.
Issue: #240
Signed-off-by: Mitch Gaffigan <mitch.gaffigan@comcast.net>
returnnewLoginStatus(LoginStatus.Status.FAIL_LOCKED_OUT, "User account \"" + username + "\" has been locked. You may attempt to login again in " + loginRequirementsChecker.getPrintableStrikeTimeRemaining() + ".");
305
+
if (passwordRequirements.getAllowEnumeration()) {
306
+
returnnewLoginStatus(LoginStatus.Status.FAIL_LOCKED_OUT, "User account \"" + username + "\" has been locked. You may attempt to login again in " + loginRequirementsChecker.getPrintableStrikeTimeRemaining() + ".");
if (loginRequirementsChecker.isLockoutEnabled()) {
396
+
if (loginRequirementsChecker.isLockoutEnabled() && passwordRequirements.getAllowEnumeration()) {
392
397
if (loginRequirementsChecker.isUserLockedOut()) {
393
398
status = LoginStatus.Status.FAIL_LOCKED_OUT;
394
399
failMessage += " User account \"" + username + "\" has been locked. You may attempt to login again in " + loginRequirementsChecker.getPrintableStrikeTimeRemaining() + ".";
0 commit comments