tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lar...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers DecodeInterceptor.java
Date Tue, 09 Oct 2001 02:35:05 GMT
larryi      01/10/08 19:35:05

  Modified:    src/share/org/apache/tomcat/modules/mappers
                        DecodeInterceptor.java
  Log:
  Remove unnecessary "jsessionid" handling which I added before I
  discovered what Base64 encoding was.
  
  Revision  Changes    Path
  1.13      +8 -15     jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers/DecodeInterceptor.java
  
  Index: DecodeInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers/DecodeInterceptor.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DecodeInterceptor.java	2001/10/05 03:46:55	1.12
  +++ DecodeInterceptor.java	2001/10/09 02:35:05	1.13
  @@ -407,24 +407,17 @@
       private boolean isSafeURI(MessageBytes pathMB) {
           int start = pathMB.indexOf('%');
           if( start >= 0 ) {
  -            int end = pathMB.indexOf(";jsessionid=");
  -            if( end < 0 || start < end ) {
  -                int percent = pathMB.indexOfIgnoreCase("%25",start);
  -                if( percent >= 0 && ( end < 0 || percent < end ) )
  -                    return false;
  +            if( pathMB.indexOfIgnoreCase("%25",start) >= 0 )
  +                return false;
   
  -                int period = pathMB.indexOfIgnoreCase("%2E",start);
  -                if( period >= 0 && ( end < 0 || period < end ) )
  -                    return false;
  +            if( pathMB.indexOfIgnoreCase("%2E",start) >= 0 )
  +                return false;
   
  -                int fslash = pathMB.indexOfIgnoreCase("%2F",start);
  -                if( fslash >= 0 && ( end < 0 || fslash < end ) )
  -                    return false;
  +            if( pathMB.indexOfIgnoreCase("%2F",start) >= 0 )
  +                return false;
   
  -                int bslash = pathMB.indexOfIgnoreCase("%5C",start);
  -                if( bslash >= 0 && ( end < 0 || bslash < end ) )
  -                    return false;
  -            }
  +            if( pathMB.indexOfIgnoreCase("%5C",start) >= 0 )
  +                return false;
           }
   
           return true;
  
  
  

Mime
View raw message