diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2007-09-23 15:19:21 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2007-09-23 15:19:21 +0000 |
commit | f60df047f14071ade900af36ca6dbd2ab16abf9c (patch) | |
tree | 0158708979fc509c6d95a67b7426780865d5fd71 | |
parent | ddc1871576fa289c1dd614fb81cceebc77ec15bd (diff) | |
download | php-git-f60df047f14071ade900af36ca6dbd2ab16abf9c.tar.gz |
Fixed bug #42739 (mkdir() doesnt like a trailing slash when safe_mode is
enabled).
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | main/safe_mode.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -30,6 +30,8 @@ PHP NEWS Reported by Laurent gaffie. (Ilia) - Fixed imagerectangle regression with 1x1 rectangle (libgd #106). (Pierre) +- Fixed bug #42739 (mkdir() doesnt like a trailing slash when safe_mode is + enabled). (Ilia) - Fixed bug #42643 (CLI segfaults if using ATTR_PERSISTENT). (Ilia) - Fixed bug #42629 (Dynamically loaded PHP extensions need symbols exported on MacOSX). (jdolecek at NetBSD dot org) diff --git a/main/safe_mode.c b/main/safe_mode.c index 6dc5640425..0c1523e57c 100644 --- a/main/safe_mode.c +++ b/main/safe_mode.c @@ -125,7 +125,7 @@ PHPAPI int php_checkuid_ex(const char *filename, const char *fopen_mode, int mod /* root dir */ path[0] = DEFAULT_SLASH; path[1] = '\0'; - } else if (s) { + } else if (s && *(s + 1) != '\0') { /* make sure that the / is not the last character */ *s = '\0'; VCWD_REALPATH(filename, path); *s = DEFAULT_SLASH; |