iliaa           Tue Feb 10 11:09:57 2004 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src    NEWS 
    /php-src/main       fopen_wrappers.c 
  Log:
  MFH: Fixed bug #26653 (open_basedir incorrectly resolved on win32).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.558&r2=1.1247.2.559&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.558 php-src/NEWS:1.1247.2.559
--- php-src/NEWS:1.1247.2.558   Mon Feb  9 21:00:02 2004
+++ php-src/NEWS        Tue Feb 10 11:09:55 2004
@@ -13,6 +13,8 @@
   the 'Status: 200' header that is not normally needed). (Ilia)
 - Fixed bug #26758 (FastCGI exits immediately with status 255). (Ilia, 
   tcarter at noggin dot com dot au)
+- Fixed bug #26653 (open_basedir incorrectly resolved on win32). (Ilia,
+  scottmacvicar at ntlworld dot com)
 - Fixed bug #24773 (unsetting string as array causes a crash). (Sara)
 
 03 Feb 2004, Version 4.3.5RC2
http://cvs.php.net/diff.php/php-src/main/fopen_wrappers.c?r1=1.153.2.7&r2=1.153.2.8&ty=u
Index: php-src/main/fopen_wrappers.c
diff -u php-src/main/fopen_wrappers.c:1.153.2.7 php-src/main/fopen_wrappers.c:1.153.2.8
--- php-src/main/fopen_wrappers.c:1.153.2.7     Wed Jul 30 13:55:21 2003
+++ php-src/main/fopen_wrappers.c       Tue Feb 10 11:09:56 2004
@@ -16,7 +16,7 @@
    |          Jim Winstead <[EMAIL PROTECTED]>                                 |
    +----------------------------------------------------------------------+
  */
-/* $Id: fopen_wrappers.c,v 1.153.2.7 2003/07/30 17:55:21 iliaa Exp $ */
+/* $Id: fopen_wrappers.c,v 1.153.2.8 2004/02/10 16:09:56 iliaa Exp $ */
 
 /* {{{ includes
  */
@@ -132,15 +132,15 @@
        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';
                        }
                }



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

Reply via email to