diff options
| author | Pierre Joye <pajoye@php.net> | 2011-01-18 22:20:09 +0000 |
|---|---|---|
| committer | Pierre Joye <pajoye@php.net> | 2011-01-18 22:20:09 +0000 |
| commit | 95388b7cdab48a167e06188467597d554489f686 (patch) | |
| tree | f2bc8ecb08b5dd8ea1e772b2e8bf862661bb3f42 | |
| parent | f455f85e6cbfe3792beaa0f1262d56628ee01554 (diff) | |
| download | php-git-95388b7cdab48a167e06188467597d554489f686.tar.gz | |
- fix regression introduced in 5.3.4 in open_basedir on windows/novell with trailing fwd slash
| -rw-r--r-- | main/fopen_wrappers.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index fe83092285..4ec3e5ee7a 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -228,7 +228,11 @@ PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path if (expand_filepath(local_open_basedir, resolved_basedir TSRMLS_CC) != NULL) { /* Handler for basedirs that end with a / */ resolved_basedir_len = strlen(resolved_basedir); +#if defined(PHP_WIN32) || defined(NETWARE) + if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR || basedir[strlen(basedir) - 1] == '/') { +#else if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) { +#endif if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; resolved_basedir[++resolved_basedir_len] = '\0'; |
