Send to the error page when hs.jsp is accessed directly instead of locking up the...
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 26 Feb 2003 06:12:04 +0000 (06:12 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 26 Feb 2003 06:12:04 +0000 (06:12 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@512 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

webApplication/hs.jsp

index 3405c52..5d9148f 100755 (executable)
@@ -17,7 +17,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     <jsp:useBean id="hs_helpText" scope="application" class="java.lang.String"/>
     <jsp:useBean id="hs_detailedHelpURL" scope="application" class="java.lang.String"/>
        
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<html xmlns="http://www.w3.org/1999/xhtml"" xml:lang="en" lang="en">
 <head>
     <link rel="stylesheet" type="text/css" href="main.css" />
     <title>Shibboleth Handle Request Processed</title>
@@ -25,12 +25,26 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 
 <body onLoad="document.forms[0].submit()">
 
+<% 
+       if (request.getAttribute("shire") == null
+               || request.getAttribute("shire").equals("")
+               || request.getAttribute("target") == null
+               || request.getAttribute("target").equals("")
+               || request.getAttribute("assertion") == null
+               || request.getAttribute("assertion").equals("")) 
+       {
+               request.setAttribute("requestURL", request.getRequestURI()); 
+               request.setAttribute("errorText", "This page cannot be accessed directly"); 
+        request.getRequestDispatcher("/hserror.jsp").forward(request, response);
+       }
+%>
+
 <h1>Shibboleth Handle Request Processed</h1>
 
 <!-- <p><bean:write name="hs_helpText" /></p> -->
 
 <script language="JavaScript">
-<!--
+<!--   
 document.write("<p>You are automatically being redirected to the requested site. ");
 document.write("If the browser appears to be hung up after 15-20 seconds, try reloading ");
 document.write("the page before contacting the technical support staff in charge of the ");