Author: markt Date: Wed Oct 3 11:16:07 2018 New Revision: 1842702 URL: http://svn.apache.org/viewvc?rev=1842702&view=rev Log: Ensure that a canonical path is always used for the docBase of a Context to ensure consistent behaviour.
Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java tomcat/trunk/webapps/docs/changelog.xml 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=1842702&r1=1842701&r2=1842702&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Wed Oct 3 11:16:07 2018 @@ -579,7 +579,7 @@ public class ContextConfig implements Li File file = new File(docBase); if (!file.isAbsolute()) { - docBase = (new File(appBase, docBase)).getPath(); + docBase = (new File(appBase, docBase)).getCanonicalPath(); } else { docBase = file.getCanonicalPath(); } Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1842702&r1=1842701&r2=1842702&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Wed Oct 3 11:16:07 2018 @@ -88,6 +88,10 @@ <code>conf/context.xml</code> and <code>conf/web.xml</code> on a per host basis. (fschumacher) </fix> + <fix> + Ensure that a canonical path is always used for the docBase of a Context + to ensure consistent behaviour. (markt) + </fix> </changelog> </subsection> <subsection name="Coyote"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org