Fix redirect in case of error at ForgotPasswordServlet page
This commit is contained in:
parent
a3f607bf09
commit
a1d622e2f1
|
@ -61,13 +61,13 @@ public class ForgotPasswordServlet extends HttpServlet {
|
|||
response.sendRedirect("./forgotPassword.jsp");
|
||||
} else if (formEmail.isEmpty()) {
|
||||
request.getSession().setAttribute("message", "Please enter your email.");
|
||||
response.sendRedirect("./remindUsername.jsp");
|
||||
response.sendRedirect("./forgotPassword.jsp");
|
||||
} else if (!EmailValidator.getInstance().isValid(formEmail)) {
|
||||
request.getSession().setAttribute("message", "Please enter a valid email.");
|
||||
response.sendRedirect("./remindUsername.jsp");
|
||||
response.sendRedirect("./forgotPassword.jsp");
|
||||
} else if (!VerifyRecaptcha.verify(gRecaptchaResponse, secret)) {
|
||||
request.getSession().setAttribute("message", "You missed the reCAPTCHA validation!");
|
||||
response.sendRedirect("./remindUsername.jsp");
|
||||
response.sendRedirect("./forgotPassword.jsp");
|
||||
} else {
|
||||
try {
|
||||
String username = ldapActions.getUsername(formEmail);
|
||||
|
|
Loading…
Reference in New Issue