Skip to content

Commit

Permalink
Merge pull request #762 from Lakshan-Banneheke/fix-recaptcha-bugs
Browse files Browse the repository at this point in the history
Fix bug in handling captcha failure in email otp
  • Loading branch information
sumedhe authored Sep 20, 2023
2 parents 2c4d803 + 6e2e6ee commit 5721150
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class EmailOTPCaptchaConnector extends AbstractReCaptchaConnector {
public static final String EMAIL_OTP_AUTHENTICATOR_NAME = "EmailOTP";
public static final String IS_REDIRECT_TO_EMAIL_OTP = "isRedirectToEmailOTP";
public static final String RESEND_CODE = "resendCode";
private static final String ON_FAIL_REDIRECT_URL = "/authenticationendpoint/login.do";
private static final String ON_FAIL_REDIRECT_URL = "/authenticationendpoint/email_otp.do";
private static final String EMAIL_OTP_LOGIN_ATTEMPT_FAIL_CLAIM = "http://wso2.org/claims/identity/failedEmailOtpAttempts";
private static final String RECAPTCHA_PARAM = "reCaptcha";
private static final String AUTH_FAILURE = "authFailure";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public static String getOnFailRedirectUrl(String redirectURL, List<String> onFai
// Check whether the flow is authentication related.
if (isAuthenticationFlow) {
for (String url : onFailRedirectUrls) {
if (!StringUtils.isBlank(url) && url.equalsIgnoreCase(uriBuilder.getPath())) {
if (!StringUtils.isBlank(uriBuilder.getPath()) && uriBuilder.getPath().contains(url)) {
return getUpdatedUrl(redirectURL, attributes);
}
}
Expand Down

0 comments on commit 5721150

Please sign in to comment.