Mercurial > dive4elements > river
changeset 4450:0074c113bb95
Be sure that a redirect url always exist
When redirecting the user after a successful authentication be sure that the url
is valid.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Thu, 08 Nov 2012 10:29:09 +0100 |
parents | f3c4976874f2 |
children | e2d8f344491e |
files | flys-client/src/main/java/de/intevation/flys/client/server/LoginServlet.java |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/server/LoginServlet.java Wed Nov 07 15:58:03 2012 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/LoginServlet.java Thu Nov 08 10:29:09 2012 +0100 @@ -21,6 +21,7 @@ public class LoginServlet extends HttpServlet { private static Logger logger = Logger.getLogger(LoginServlet.class); + private static final String FLYS_PAGE = "FLYS.html"; private void redirectFailure(HttpServletResponse resp, String path) throws IOException { @@ -41,7 +42,9 @@ String uri) throws IOException { if (uri == null) { String redirecturl = getServletContext().getInitParameter("redirect-url"); - + if (redirecturl == null) { + redirecturl = FLYS_PAGE; + } uri = "/" + redirecturl; } resp.sendRedirect(uri);