# HG changeset patch # User Björn Ricks # Date 1352366949 -3600 # Node ID 0074c113bb957049f75977f2528600bb99364dc0 # Parent f3c4976874f2224306426e0ba22b5651a2513e13 Be sure that a redirect url always exist When redirecting the user after a successful authentication be sure that the url is valid. diff -r f3c4976874f2 -r 0074c113bb95 flys-client/src/main/java/de/intevation/flys/client/server/LoginServlet.java --- 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);