larryi 01/02/16 11:37:11
Modified: src/share/org/apache/tomcat/modules/aaa
AccessInterceptor.java
Log:
Fix the match() method so "/abc123" and "/abc.jsp" don't match the
url-pattern "/abc/*"
Revision Changes Path
1.6 +6 -1
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.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- AccessInterceptor.java 2001/02/06 06:30:58 1.5
+++ AccessInterceptor.java 2001/02/16 19:37:09 1.6
@@ -359,7 +359,12 @@
// in core
if( path.length() < ctPathL - 2 )
return false;
- for( int i=0; i< ctPathL - 2 ; i++ ) {
+ // determine how much to match
+ int matchLen = ctPathL - 2; // match up to, but not including the '/'
+ // if more can be matched in the path, include matching the '/'
+ if( path.length() > matchLen )
+ matchLen++;
+ for( int i=0; i< matchLen ; i++ ) {
if( path.charAt( i ) != ctPath.charAt( i ))
return false;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]