iliaa           Sun Sep 23 15:19:21 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/main       safe_mode.c 
    /php-src    NEWS 
  Log:
  
  Fixed bug #42739 (mkdir() doesnt like a trailing slash when safe_mode is 
  enabled).
  
http://cvs.php.net/viewvc.cgi/php-src/main/safe_mode.c?r1=1.62.2.1.2.9&r2=1.62.2.1.2.10&diff_format=u
Index: php-src/main/safe_mode.c
diff -u php-src/main/safe_mode.c:1.62.2.1.2.9 
php-src/main/safe_mode.c:1.62.2.1.2.10
--- php-src/main/safe_mode.c:1.62.2.1.2.9       Sat Jul 21 01:43:33 2007
+++ php-src/main/safe_mode.c    Sun Sep 23 15:19:21 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: safe_mode.c,v 1.62.2.1.2.9 2007/07/21 01:43:33 jani Exp $ */
+/* $Id: safe_mode.c,v 1.62.2.1.2.10 2007/09/23 15:19:21 iliaa Exp $ */
 
 #include "php.h"
 
@@ -125,7 +125,7 @@
                        /* 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;
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.960&r2=1.2027.2.547.2.961&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.960 php-src/NEWS:1.2027.2.547.2.961
--- php-src/NEWS:1.2027.2.547.2.960     Fri Sep 21 13:10:59 2007
+++ php-src/NEWS        Sun Sep 23 15:19:21 2007
@@ -30,6 +30,8 @@
   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)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to