Author: markt Date: Tue Apr 15 10:31:14 2008 New Revision: 648349 URL: http://svn.apache.org/viewvc?rev=648349&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44380 Don't scan non-file URLs for TLDs Patch provided by Florent BENOIT
Modified: tomcat/tc6.0.x/trunk/STATUS.txt tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/TldConfig.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=648349&r1=648348&r2=648349&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Apr 15 10:31:14 2008 @@ -137,12 +137,6 @@ +1: markt, remm -1: -* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44380 - Don't scan non-file URLs for TLDs - http://svn.apache.org/viewvc?rev=647345&view=rev - +1: markt, remm, pero - -1: - * Fix some links in ROOT app is renamed. Minor clean-up. http://svn.apache.org/viewvc?rev=648017&view=rev +1: markt, remm, pero Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/TldConfig.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/TldConfig.java?rev=648349&r1=648348&r2=648349&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/TldConfig.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/TldConfig.java Tue Apr 15 10:31:14 2008 @@ -685,11 +685,17 @@ if (loader instanceof URLClassLoader) { URL[] urls = ((URLClassLoader) loader).getURLs(); for (int i=0; i<urls.length; i++) { - // Expect file URLs, these are %xx encoded or not depending on - // the class loader + // Expect file URLs, these are %xx encoded or not depending + // on the class loader // This is definitely not as clean as using JAR URLs either // over file or the custom jndi handler, but a lot less // buggy overall + + // Check that the URL is using file protocol, else ignore it + if (!"file".equals(urls[i].getProtocol())) { + continue; + } + File file = null; try { file = new File(urls[i].toURI()); 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=648349&r1=648348&r2=648349&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Tue Apr 15 10:31:14 2008 @@ -51,6 +51,10 @@ Fix NPE when iterating through sessions for expiration. (fhanik/jim) </fix> <fix> + <bug>44380</bug>: Don't scan non-file URLs for TLDs. Patch provided by + Florent Benoit. (markt) + </fix> + <fix> <bug>44529</bug>: Correct handling of resource constraints so no roles (deny all) overrides no aoth-constraint (allow all). (markt) </fix> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]