Project

General

Profile

« Previous | Next » 

Revision 51991

Added by Sofia Baltzi over 6 years ago

Fix redirect in case of error at ForgotPasswordServlet page

View differences:

modules/dnet-openaire-users/trunk/src/main/java/eu/dnetlib/openaire/usermanagement/ForgotPasswordServlet.java
61 61
            response.sendRedirect("./forgotPassword.jsp");
62 62
        } else if (formEmail.isEmpty()) {
63 63
            request.getSession().setAttribute("message", "Please enter your email.");
64
            response.sendRedirect("./remindUsername.jsp");
64
            response.sendRedirect("./forgotPassword.jsp");
65 65
        } else if (!EmailValidator.getInstance().isValid(formEmail)) {
66 66
            request.getSession().setAttribute("message", "Please enter a valid email.");
67
            response.sendRedirect("./remindUsername.jsp");
67
            response.sendRedirect("./forgotPassword.jsp");
68 68
        } else if (!VerifyRecaptcha.verify(gRecaptchaResponse, secret)) {
69 69
            request.getSession().setAttribute("message", "You missed the reCAPTCHA validation!");
70
            response.sendRedirect("./remindUsername.jsp");
70
            response.sendRedirect("./forgotPassword.jsp");
71 71
        } else {
72 72
            try {
73 73
                String username = ldapActions.getUsername(formEmail);

Also available in: Unified diff