Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=43142
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 1 May 2008 07:00:14 +0000 (07:00 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 1 May 2008 07:00:14 +0000 (07:00 +0000)
If someone is daft enough to name their directory xxx.war, don't assume it is a war file.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@652441 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/startup/HostConfig.java

index 29e9f05..38edd39 100644 (file)
@@ -701,7 +701,7 @@ public class HostConfig
             if (files[i].equalsIgnoreCase("WEB-INF"))
                 continue;
             File dir = new File(appBase, files[i]);
-            if (files[i].toLowerCase().endsWith(".war")) {
+            if (files[i].toLowerCase().endsWith(".war") && dir.isFile()) {
                 
                 // Calculate the context path and make sure it is unique
                 String contextPath = "/" + files[i];