From: markt Date: Mon, 9 Feb 2009 19:05:44 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=38570 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a5e46fd8b7704529f444e7d77977fdbdc88a5fd6;p=tomcat7.0 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 git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@742677 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/startup/ContextConfig.java b/java/org/apache/catalina/startup/ContextConfig.java index 6fa6dff65..1fe43c688 100644 --- a/java/org/apache/catalina/startup/ContextConfig.java +++ b/java/org/apache/catalina/startup/ContextConfig.java @@ -908,7 +908,7 @@ public class ContextConfig } } - 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("/")) {