Add additional information to assist with tracking down the root cause of https:...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 11 Feb 2011 15:21:54 +0000 (15:21 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 11 Feb 2011 15:21:54 +0000 (15:21 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1069832 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/startup/ExpandWar.java
java/org/apache/catalina/startup/LocalStrings.properties
webapps/docs/changelog.xml

index e9fdcdc..80f14ff 100644 (file)
@@ -119,7 +119,9 @@ public class ExpandWar {
                     // Trying to expand outside the docBase
                     // Throw an exception to stop the deployment
                     throw new IllegalArgumentException(
-                            sm.getString("expandWar.illegalPath",war, name));
+                            sm.getString("expandWar.illegalPath",war, name,
+                                    expandedFile.getCanonicalPath(),
+                                    canonicalDocBasePrefix));
                 }
                 int last = name.lastIndexOf('/');
                 if (last >= 0) {
@@ -220,7 +222,9 @@ public class ExpandWar {
                     // Entry located outside the docBase
                     // Throw an exception to stop the deployment
                     throw new IllegalArgumentException(
-                            sm.getString("expandWar.illegalPath",war, name));
+                            sm.getString("expandWar.illegalPath",war, name,
+                                    expandedFile.getCanonicalPath(),
+                                    canonicalDocBasePrefix));
                 }
             }
         } catch (IOException e) {
index b2912b9..086e06b 100644 (file)
@@ -69,7 +69,7 @@ engineConfig.start=EngineConfig: Processing START
 engineConfig.stop=EngineConfig: Processing STOP
 expandWar.copy=Error copying {0} to {1}
 expandWar.deleteFailed=[{0}] could not be completely deleted. The presence of the remaining files may cause problems
-expandWar.illegalPath=The archive [{0}] is malformed and will be ignored: an entry contains an illegal path [{1}]
+expandWar.illegalPath=The archive [{0}] is malformed and will be ignored: an entry contains an illegal path [{1}] which was not expanded to [{2}] since that is outside of the defined docBase [{3}]
 hostConfig.appBase=Application base directory {0} does not exist
 hostConfig.canonicalizing=Error delete redeploy resources from context [{0}]
 hostConfig.cce=Lifecycle event data object {0} is not a Host
index d74b007..9816fa0 100644 (file)
         <bug>50721</bug>: Correctly handle URL decoding where the URL ends in
         %nn. Patch provided by Christof Marti. (markt)
       </fix>
+      <add>
+        <bug>50737</bug>: Add additional information when an invalid WAR file is
+        detected. (markt)
+      </add>
       <fix>
         <bug>50748</bug>: Allow the content length header to be set up to the
         point the response is committed when a writer is being used. (markt)