Skip to content

Commit

Permalink
fix: loop redirect on invalid form /resetPassword
Browse files Browse the repository at this point in the history
  • Loading branch information
podlesrafal committed Feb 18, 2025
1 parent 84a35a9 commit 0a28302
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,7 @@ protected void doStart() throws Exception {

// Forgot password route
final var forgotPasswordAccessHandler = new ForgotPasswordAccessHandler(domain);
final var resetPasswordFailureHandler = new ErrorHandler(PATH_RESET_PASSWORD);
rootRouter.route(GET, PATH_FORGOT_PASSWORD)
rootRouter.route(GET, PATH_FORGOT_PASSWORD)
.handler(clientRequestParseHandler)
.handler(forgotPasswordAccessHandler)
.handler(localeHandler)
Expand Down Expand Up @@ -631,8 +630,6 @@ protected void doStart() throws Exception {
.handler(deviceIdentifierHandler)
.handler(policyChainHandler.create(ExtensionPoint.POST_RESET_PASSWORD))
.handler(new ResetPasswordSubmissionEndpoint(userService, environment));
rootRouter.route(PATH_RESET_PASSWORD)
.failureHandler(resetPasswordFailureHandler);

rootRouter.route(HttpMethod.POST, PASSWORD_HISTORY)
.handler(clientRequestParseHandlerOptional)
Expand Down Expand Up @@ -899,5 +896,7 @@ private void errorHandler(Router router) {
router.route(PATH_MFA_RECOVERY_CODE).failureHandler(errorHandler);

router.route(PATH_CONFIRM_REGISTRATION).failureHandler(errorHandler);

router.route(PATH_RESET_PASSWORD).failureHandler(errorHandler);
}
}

0 comments on commit 0a28302

Please sign in to comment.