tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r742711 - /tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java
Date Mon, 09 Feb 2009 20:00:02 GMT
Author: markt
Date: Mon Feb  9 20:00:01 2009
New Revision: 742711

URL: http://svn.apache.org/viewvc?rev=742711&view=rev
Log:
Only perform validation test when allowLinking is enabled

Modified:
    tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java

Modified: tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java?rev=742711&r1=742710&r2=742711&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java (original)
+++ tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java Mon Feb  9 20:00:01
2009
@@ -846,7 +846,7 @@
      * List the resources which are members of a collection.
      *
      * @param file Collection
-     * @return Vector containg NamingEntry objects
+     * @return Vector containing NamingEntry objects
      */
     protected ArrayList<NamingEntry> list(File file) {
 
@@ -867,8 +867,11 @@
 
         for (int i = 0; i < names.length; i++) {
 
-            File currentFile = validate(new File(file, names[i]));
-            if (currentFile == null) continue;
+            File currentFile = new File(file, names[i]);
+            if (allowLinking) {
+                currentFile = validate(currentFile);
+                if (currentFile == null) continue;
+            }
             
             Object object = null;
             if (currentFile.isDirectory()) {



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


Mime
View raw message