pajoye Tue, 18 Jan 2011 22:20:09 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=307563
Log: - fix regression introduced in 5.3.4 in open_basedir on windows/novell with trailing fwd slash Changed paths: U php/php-src/branches/PHP_5_3/main/fopen_wrappers.c U php/php-src/trunk/main/fopen_wrappers.c Modified: php/php-src/branches/PHP_5_3/main/fopen_wrappers.c =================================================================== --- php/php-src/branches/PHP_5_3/main/fopen_wrappers.c 2011-01-18 19:56:09 UTC (rev 307562) +++ php/php-src/branches/PHP_5_3/main/fopen_wrappers.c 2011-01-18 22:20:09 UTC (rev 307563) @@ -229,7 +229,11 @@ if (expand_filepath(local_open_basedir, resolved_basedir TSRMLS_CC) != NULL) { /* Handler for basedirs that end with a / */ resolved_basedir_len = strlen(resolved_basedir); +#if defined(PHP_WIN32) || defined(NETWARE) + if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR || basedir[strlen(basedir) - 1] == '/') { +#else if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) { +#endif if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; resolved_basedir[++resolved_basedir_len] = '\0'; Modified: php/php-src/trunk/main/fopen_wrappers.c =================================================================== --- php/php-src/trunk/main/fopen_wrappers.c 2011-01-18 19:56:09 UTC (rev 307562) +++ php/php-src/trunk/main/fopen_wrappers.c 2011-01-18 22:20:09 UTC (rev 307563) @@ -228,7 +228,11 @@ if (expand_filepath(local_open_basedir, resolved_basedir TSRMLS_CC) != NULL) { /* Handler for basedirs that end with a / */ resolved_basedir_len = strlen(resolved_basedir); +#if defined(PHP_WIN32) || defined(NETWARE) + if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR || basedir[strlen(basedir) - 1] == '/') { +#else if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) { +#endif if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; resolved_basedir[++resolved_basedir_len] = '\0';
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php