Author: schultz
Date: Tue Sep 20 20:33:05 2011
New Revision: 1173343
URL: http://svn.apache.org/viewvc?rev=1173343&view=rev
Log:
Fixed bug #51580: Severe error deploying WAR application (ExpandWar error)
- Added nicer error message when WAR file filenames are improperly encoded.
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ExpandWar.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ExpandWar.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ExpandWar.java?rev=1173343&r1=1173342&r2=1173343&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ExpandWar.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ExpandWar.java Tue
Sep 20 20:33:05 2011
@@ -30,6 +30,7 @@ import java.nio.channels.FileChannel;
import java.util.Enumeration;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
+import java.util.zip.ZipException;
import org.apache.catalina.Globals;
import org.apache.catalina.Host;
@@ -137,6 +138,9 @@ public class ExpandWar {
}
input = jarFile.getInputStream(jarEntry);
+ if(null == input)
+ throw new
ZipException(sm.getString("expandWar.missingJarEntry", jarEntry.getName()));
+
// Bugzilla 33636
expand(input, expandedFile);
long lastModified = jarEntry.getTime();
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=1173343&r1=1173342&r2=1173343&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties
Tue Sep 20 20:33:05 2011
@@ -73,6 +73,7 @@ expandWar.copy=Error copying {0} to {1}
expandWar.createFailed=Unable to create the directory [{0}]
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}] which was not expanded to [{2}] since that
is outside of the defined docBase [{3}]
+expandWar.missingJarEntry=Cannot get input stream for JarEntry "{0}" - broken
WAR file?
hostConfig.appBase=Application base [{1}] for host [{0}] does not exist or is
not a directory. deployOnStartUp and autoDeploy have been set to false to
prevent deployment errors. Other errors may still occur.
hostConfig.canonicalizing=Error delete redeploy resources from context [{0}]
hostConfig.cce=Lifecycle event data object {0} is not a Host
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1173343&r1=1173342&r2=1173343&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Sep 20 20:33:05 2011
@@ -63,6 +63,10 @@
appropriate error page is configured. (markt)
</fix>
<fix>
+ <bug>51580</bug>: Added a nicer error message when a WAR file contains
+ filenames not properly encoded in UTF-8. (schultz)
+ </fix>
+ <fix>
<bug>51687</bug>: Added (optional) protection against
sun.java2d.Disposer thread pinning a WebappClassLoader into memory
in the JreMemoryLeakPreventionListener. (schultz)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]