[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /main fopen_wrappers.c
iliaa Mon Mar 15 19:32:10 2004 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS /php-src/main fopen_wrappers.c Log: MFH: Fixed bug #27559 (Corrected open_basedir resolving logic). http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.598r2=1.1247.2.599ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.598 php-src/NEWS:1.1247.2.599 --- php-src/NEWS:1.1247.2.598 Mon Mar 15 16:26:59 2004 +++ php-src/NEWSMon Mar 15 19:32:09 2004 @@ -11,6 +11,7 @@ - Fixed bug #27590 (crash during shutdown when freeing persistent resources in ZTS mode). (Ilia) - Fixed bug #27582 (possible crashes in imagefilltoborder()). (Pierre) +- Fixed bug #27559 (Corrected open_basedir resolving logic). (Ilia) - Fixed bug #27530 (broken http auth when safe_mode is on and PCRE is disabled). (Ilia) - Fixed bug #27509 (broken getaddrinfo() causes fsockopen() error). (Sara) http://cvs.php.net/diff.php/php-src/main/fopen_wrappers.c?r1=1.153.2.8r2=1.153.2.9ty=u Index: php-src/main/fopen_wrappers.c diff -u php-src/main/fopen_wrappers.c:1.153.2.8 php-src/main/fopen_wrappers.c:1.153.2.9 --- php-src/main/fopen_wrappers.c:1.153.2.8 Tue Feb 10 11:09:56 2004 +++ php-src/main/fopen_wrappers.c Mon Mar 15 19:32:09 2004 @@ -16,7 +16,7 @@ | Jim Winstead [EMAIL PROTECTED] | +--+ */ -/* $Id: fopen_wrappers.c,v 1.153.2.8 2004/02/10 16:09:56 iliaa Exp $ */ +/* $Id: fopen_wrappers.c,v 1.153.2.9 2004/03/16 00:32:09 iliaa Exp $ */ /* {{{ includes */ @@ -132,11 +132,13 @@ 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 (resolved_basedir[resolved_basedir_len -1] != PHP_DIR_SEPARATOR) { - resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; - resolved_basedir[++resolved_basedir_len] = '\0'; + if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) { + if (resolved_basedir[resolved_basedir_len - 1] == '/') { + resolved_basedir[resolved_basedir_len - 1] = 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) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /main fopen_wrappers.c
iliaa Tue Feb 10 11:09:57 2004 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS /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.558r2=1.1247.2.559ty=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/NEWSTue 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.7r2=1.153.2.8ty=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