You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2010/03/01 22:34:51 UTC
svn commit: r917735 - /httpd/httpd/trunk/server/config.c
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;
}
}