tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r742677 - /tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
Date Mon, 09 Feb 2009 19:05:45 GMT
Author: markt
Date: Mon Feb  9 19:05:44 2009
New Revision: 742677

URL: http://svn.apache.org/viewvc?rev=742677&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=38570
When checking docBase against appBase, make sure we check for an exact match against the appBase

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=742677&r1=742676&r2=742677&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Mon Feb  9 19:05:44 2009
@@ -908,7 +908,7 @@
             }
         }
 
-        if (docBase.startsWith(canonicalAppBase.getPath())) {
+        if (docBase.startsWith(canonicalAppBase.getPath() + File.separatorChar)) {
             docBase = docBase.substring(canonicalAppBase.getPath().length());
             docBase = docBase.replace(File.separatorChar, '/');
             if (docBase.startsWith("/")) {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message