Send to internal error page if there is a state problem
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Sat, 12 Jan 2008 11:11:36 +0000 (11:11 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Sat, 12 Jan 2008 11:11:36 +0000 (11:11 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2571 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/authn/AuthenticationEngine.java

index 853a9f5..c8e973a 100644 (file)
@@ -92,8 +92,10 @@ public class AuthenticationEngine extends HttpServlet {
         LoginContext loginContext = (LoginContext) httpSession.getAttribute(LoginContext.LOGIN_CONTEXT_KEY);
         if (loginContext == null) {
             LOG.error("User HttpSession did not contain a login context.  Unable to return to authentication engine");
+            forwardRequest("/idp-error.jsp", httpRequest, httpResponse);
+        }else{
+            forwardRequest(loginContext.getAuthenticationEngineURL(), httpRequest, httpResponse);
         }
-        forwardRequest(loginContext.getAuthenticationEngineURL(), httpRequest, httpResponse);
     }
 
     /**