From a5e46fd8b7704529f444e7d77977fdbdc88a5fd6 Mon Sep 17 00:00:00 2001 From: markt Date: Mon, 9 Feb 2009 19:05:44 +0000 Subject: [PATCH] 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 --- java/org/apache/catalina/startup/ContextConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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("/")) { -- 2.11.0