From 80be4c9dbc402243aee2f2c4922d2bc2a050f954 Mon Sep 17 00:00:00 2001 From: Bill Burke Date: Sat, 16 Dec 2017 07:12:32 -0500 Subject: [PATCH] fix more --- .../browser/AbstractUsernameFormAuthenticator.java | 2 ++ .../test/java/org/keycloak/testsuite/forms/BruteForceTest.java | 1 + 2 files changed, 3 insertions(+) diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/browser/AbstractUsernameFormAuthenticator.java b/services/src/main/java/org/keycloak/authentication/authenticators/browser/AbstractUsernameFormAuthenticator.java index b944149b8f..6b6da564f9 100755 --- a/services/src/main/java/org/keycloak/authentication/authenticators/browser/AbstractUsernameFormAuthenticator.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/browser/AbstractUsernameFormAuthenticator.java @@ -126,6 +126,7 @@ public abstract class AbstractUsernameFormAuthenticator extends AbstractFormAuth context.getEvent().error(Errors.USER_DISABLED); Response challengeResponse = disabledUser(context); // this is not a failure so don't call failureChallenge. + //context.failureChallenge(AuthenticationFlowError.USER_DISABLED, challengeResponse); context.forceChallenge(challengeResponse); return false; } @@ -135,6 +136,7 @@ public abstract class AbstractUsernameFormAuthenticator extends AbstractFormAuth context.getEvent().error(Errors.USER_TEMPORARILY_DISABLED); Response challengeResponse = temporarilyDisabledUser(context); // this is not a failure so don't call failureChallenge. + //context.failureChallenge(AuthenticationFlowError.USER_TEMPORARILY_DISABLED, challengeResponse); context.forceChallenge(challengeResponse); return false; } diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/BruteForceTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/BruteForceTest.java index a10ffb6fec..a6c95fe11d 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/BruteForceTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/BruteForceTest.java @@ -300,6 +300,7 @@ public class BruteForceTest extends AbstractTestRealmKeycloakTest { // KEYCLOAK-5420 // Test to make sure that temporarily disabled doesn't increment failure count testingClient.testing().setTimeOffset(Collections.singletonMap("offset", String.valueOf(52))); + // should be unlocked now loginSuccess(); clearUserFailures(); clearAllUserFailures();