tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r697048 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/catalina/loader/WebappLoader.java java/org/apache/catalina/util/ExtensionValidator.java webapps/docs/changelog.xml
Date Fri, 19 Sep 2008 10:59:38 GMT
Author: markt
Date: Fri Sep 19 03:59:38 2008
New Revision: 697048

URL: http://svn.apache.org/viewvc?rev=697048&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45785
Ignore directories named xxx.jar in WEB-INF/lib

Modified:
    tomcat/tc6.0.x/trunk/STATUS.txt
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappLoader.java
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/util/ExtensionValidator.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=697048&r1=697047&r2=697048&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Sep 19 03:59:38 2008
@@ -140,13 +140,6 @@
   +1: jfclere, remm
   -1: 
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45785
-  Ignore directories named xxx.jar in WEB-INF/lib
-  http://svn.apache.org/viewvc?rev=695274&view=rev
-  http://svn.apache.org/viewvc?rev=695284&view=rev
-  +1: markt, remm, pero
-  -1: 
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45451
   Don't unescape tag attribute values with EL twice
   Also fix numerous \${...} issues

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappLoader.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappLoader.java?rev=697048&r1=697047&r2=697048&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappLoader.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappLoader.java Fri Sep 19 03:59:38
2008
@@ -998,7 +998,13 @@
                     log.debug(sm.getString("webappLoader.jarDeploy", filename,
                                      destFile.getAbsolutePath()));
 
-                    Resource jarResource = (Resource) binding.getObject();
+                    Object obj = binding.getObject();
+                    
+                    if (!(obj instanceof Resource))
+                        continue;
+                    
+                    Resource jarResource = (Resource) obj;
+                    
                     if (copyJars) {
                         if (!copy(jarResource.streamContent(),
                                   new FileOutputStream(destFile)))

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/util/ExtensionValidator.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/util/ExtensionValidator.java?rev=697048&r1=697047&r2=697048&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/util/ExtensionValidator.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/util/ExtensionValidator.java Fri Sep 19
03:59:38 2008
@@ -179,8 +179,13 @@
                 if (!binding.getName().toLowerCase().endsWith(".jar")) {
                     continue;
                 }
-                Resource resource = (Resource)dirContext.lookup
-                                        ("/WEB-INF/lib/" + binding.getName());
+                Object obj =
+                    dirContext.lookup("/WEB-INF/lib/" + binding.getName());
+                if (!(obj instanceof Resource)) {
+                    // Probably a directory named xxx.jar - ignore it
+                    continue;
+                }
+                Resource resource = (Resource) obj;
                 Manifest jmanifest = getManifest(resource.streamContent());
                 if (jmanifest != null) {
                     ManifestResource mre = new ManifestResource(

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=697048&r1=697047&r2=697048&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Fri Sep 19 03:59:38 2008
@@ -62,6 +62,10 @@
         Provide full stacktrace and message when the ErrorReportValveClass can't
         be instantiated. (funkman) 
       </add>
+      <fix>
+        <bug>45785</bug>: Ignore directories named xxx.jar in WEB-INF/lib.
+        (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message