billbarker    01/10/26 19:12:19

  Modified:    src/share/org/apache/tomcat/modules/aaa
                        AccessInterceptor.java
  Log:
  With the old code, if you have a context "/foo" and set it's login page to 
"/foologin.html", horrible things would happen to you.  With this, the context has to 
be the first component in order to fail.
  
  Of course, having a "/foo" sub-directory of the context will still fail, but I can 
later that one.
  
  Revision  Changes    Path
  1.19      +2 -2      
jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa/AccessInterceptor.java
  
  Index: AccessInterceptor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa/AccessInterceptor.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- AccessInterceptor.java    2001/10/03 05:38:44     1.18
  +++ AccessInterceptor.java    2001/10/27 02:12:19     1.19
  @@ -160,7 +160,7 @@
            String cpath=ctx.getPath();
            
            // Workaround for common error - ctx path included
  -         if( page.startsWith( cpath ) ) {
  +         if( page.startsWith( cpath + "/" ) ) {
                if( ! ("".equals(cpath) || "/".equals(cpath)) )
                    ctx.log("FORM: WARNING, login page starts with " +
                            "context path " + page + " " + cpath );
  @@ -168,7 +168,7 @@
                page= cpath + page;
   
   
  -         if( errorPage.startsWith( cpath ) ) {
  +         if( errorPage.startsWith( cpath + "/" ) ) {
                if( ! ("/".equals(cpath) || "".equals( cpath )) )
                    ctx.log("FORM: WARNING, error page starts with " +
                            "context path " + errorPage);
  
  
  


Reply via email to