From db97db94306409ce0860f82ab7dbc83b336e8cda Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 24 Jul 2007 09:07:33 +0000 Subject: [PATCH] Fixed bug #42027 is_file() / is_dir() matches file/dirnames with wildcard char or trailing slash --- NEWS | 2 ++ TSRM/tsrm_virtual_cwd.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/NEWS b/NEWS index c552481e64..b3db3c8533 100644 --- a/NEWS +++ b/NEWS @@ -62,6 +62,8 @@ PHP NEWS - Fixed bug #42072 (No warning message for clearstatcache() with arguments). (Ilia) - Fixed bug #42071 (ini scanner allows using NULL as option name). (Jani) +- Fixed bug #42027 is_file() / is_dir() matches file/dirnames with wildcard + char or trailing slash. (Dmitry) - Fixed bug #42019 (configure option --with-adabas=DIR does not work). (Jani) - Fixed bug #42015 (ldap_rename(): server error "DSA is unwilling to perform"). (bob at mroczka dot com, Jani) diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index 8e14365abe..7bec8f2460 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -565,6 +565,13 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func #endif no_realpath: +#ifdef TSRM_WIN32 + if (memchr(path, '*', path_length) || + memchr(path, '?', path_length)) { + return 1; + } +#endif + free_path = path_copy = tsrm_strndup(path, path_length); CWD_STATE_COPY(&old_state, state); -- 2.40.0