httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r917735 - /httpd/httpd/trunk/server/config.c
Date Mon, 01 Mar 2010 21:34:51 GMT
Author: minfrin
Date: Mon Mar  1 21:34:51 2010
New Revision: 917735

URL: http://svn.apache.org/viewvc?rev=917735&view=rev
Log:
When loading wildcards that are part of a path, only consider directories
and ignore other files. [Dan Poirier, Graham Leggett]

Modified:
    httpd/httpd/trunk/server/config.c

Modified: httpd/httpd/trunk/server/config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/config.c?rev=917735&r1=917734&r2=917735&view=diff
==============================================================================
--- httpd/httpd/trunk/server/config.c (original)
+++ httpd/httpd/trunk/server/config.c Mon Mar  1 21:34:51 2010
@@ -1542,7 +1542,7 @@
 }
 
 typedef struct {
-    char *fname;
+    const char *fname;
 } fnames;
 
 static int fname_alphasort(const void *fn1, const void *fn2)
@@ -1710,8 +1710,15 @@
             && strcmp(dirent.name, "..")
             && (apr_fnmatch(fname, dirent.name,
                             APR_FNM_PERIOD) == APR_SUCCESS)) {
+            const char *full_path = ap_make_full_path(ptemp, path, dirent.name);
+            /* If matching internal to path, and we happen to match something
+             * other than a directory, skip it
+             */
+            if (rest && (rv == APR_SUCCESS) && (dirent.filetype != APR_DIR))
{
+                continue;
+            }
             fnew = (fnames *) apr_array_push(candidates);
-            fnew->fname = ap_make_full_path(ptemp, path, dirent.name);
+            fnew->fname = full_path;
         }
     }
 



Mime
View raw message