tony2001 Wed Nov 22 11:55:36 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/main fopen_wrappers.c safe_mode.c
Log:
fix #39575 (move_uploaded_file() no longer working (safe mode related))
http://cvs.php.net/viewvc.cgi/php-src/main/fopen_wrappers.c?r1=1.175.2.3.2.3&r2=1.175.2.3.2.4&diff_format=u
Index: php-src/main/fopen_wrappers.c
diff -u php-src/main/fopen_wrappers.c:1.175.2.3.2.3
php-src/main/fopen_wrappers.c:1.175.2.3.2.4
--- php-src/main/fopen_wrappers.c:1.175.2.3.2.3 Fri Nov 10 10:55:26 2006
+++ php-src/main/fopen_wrappers.c Wed Nov 22 11:55:36 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fopen_wrappers.c,v 1.175.2.3.2.3 2006/11/10 10:55:26 dmitry Exp $ */
+/* $Id: fopen_wrappers.c,v 1.175.2.3.2.4 2006/11/22 11:55:36 tony2001 Exp $ */
/* {{{ includes
*/
@@ -531,7 +531,7 @@
new_state.cwd = strdup(cwd);
new_state.cwd_length = strlen(cwd);
- if(virtual_file_ex(&new_state, filepath, NULL, 1)) {
+ if(virtual_file_ex(&new_state, filepath, NULL, CWD_FILEPATH)) {
free(new_state.cwd);
return NULL;
}
http://cvs.php.net/viewvc.cgi/php-src/main/safe_mode.c?r1=1.62.2.1.2.3&r2=1.62.2.1.2.4&diff_format=u
Index: php-src/main/safe_mode.c
diff -u php-src/main/safe_mode.c:1.62.2.1.2.3
php-src/main/safe_mode.c:1.62.2.1.2.4
--- php-src/main/safe_mode.c:1.62.2.1.2.3 Fri Nov 10 09:56:16 2006
+++ php-src/main/safe_mode.c Wed Nov 22 11:55:36 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: safe_mode.c,v 1.62.2.1.2.3 2006/11/10 09:56:16 dmitry Exp $ */
+/* $Id: safe_mode.c,v 1.62.2.1.2.4 2006/11/22 11:55:36 tony2001 Exp $ */
#include "php.h"
@@ -55,6 +55,8 @@
php_stream_wrapper *wrapper = NULL;
TSRMLS_FETCH();
+ path[0] = '\0';
+
if (!filename) {
return 0; /* path must be provided */
}
@@ -84,7 +86,7 @@
* If that fails, passthrough and check directory...
*/
if (mode != CHECKUID_ALLOW_ONLY_DIR) {
- VCWD_REALPATH(filename, path);
+ expand_filepath(filename, path TSRMLS_CC);
ret = VCWD_STAT(path, &sb);
if (ret < 0) {
if (mode == CHECKUID_DISALLOW_FILE_NOT_EXISTS) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php