better error message when authn servlets are accessed directly
[java-idp.git] / src / edu / internet2 / middleware / shibboleth / idp / authn / provider / IPAddressLoginHandler.java
index 2418755..654346c 100644 (file)
@@ -125,7 +125,12 @@ public class IPAddressLoginHandler extends AbstractLoginHandler {
             handleDefaultAllow(httpRequest, httpResponse);
         }
 
             handleDefaultAllow(httpRequest, httpResponse);
         }
 
-        AuthenticationEngine.returnToAuthenticationEngine(httpRequest, httpResponse);
+        try {
+            AuthenticationEngine.returnToAuthenticationEngine(httpRequest, httpResponse);
+        } catch (ServletException e) {
+            // this shouldn't ever happen since the handler can only be accessed through the authentication engine
+            return;
+        }
     }
 
     protected void handleDefaultDeny(HttpServletRequest request, HttpServletResponse response) {
     }
 
     protected void handleDefaultDeny(HttpServletRequest request, HttpServletResponse response) {