diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2004-02-10 16:08:54 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2004-02-10 16:08:54 +0000 |
commit | e8beeecf3e1172180fbac6ce22e67f8a8a5e0fa4 (patch) | |
tree | d620329ef284733de129b51b6655d40d81f3003b /main/fopen_wrappers.c | |
parent | b6e14b44b4d55dad9e71a2a915760eef22b8762c (diff) | |
download | php-git-e8beeecf3e1172180fbac6ce22e67f8a8a5e0fa4.tar.gz |
Fixed bug #26653 (open_basedir incorrectly resolved on win32).
Diffstat (limited to 'main/fopen_wrappers.c')
-rw-r--r-- | main/fopen_wrappers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index b93b15a7d0..efa2a6deda 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -131,15 +131,15 @@ PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path if ((expand_filepath(path, resolved_name TSRMLS_CC) != NULL) && (expand_filepath(local_open_basedir, resolved_basedir TSRMLS_CC) != NULL)) { /* Handler for basedirs that end with a / */ resolved_basedir_len = strlen(resolved_basedir); - if (basedir[strlen(basedir)-1] == PHP_DIR_SEPARATOR && resolved_basedir[resolved_basedir_len -1] != PHP_DIR_SEPARATOR) { - resolved_basedir[resolved_basedir_len] = '/'; + if (resolved_basedir[resolved_basedir_len -1] != PHP_DIR_SEPARATOR) { + resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; resolved_basedir[++resolved_basedir_len] = '\0'; } if (path[strlen(path)-1] == PHP_DIR_SEPARATOR) { resolved_name_len = strlen(resolved_name); if (resolved_name[resolved_name_len - 1] != PHP_DIR_SEPARATOR) { - resolved_name[resolved_name_len] = '/'; + resolved_name[resolved_name_len] = PHP_DIR_SEPARATOR; resolved_name[++resolved_name_len] = '\0'; } } |