cvs: php-src(PHP_4_4) /ext/session mod_files.c

From: Date: Thu, 04 Jan 2007 23:50:45 +0000
Subject: cvs: php-src(PHP_4_4) /ext/session mod_files.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-42555@lists.php.net to get a copy of this message
iliaa Thu Jan 4 23:50:45 2007 UTC Modified files: (Branch: PHP_4_4) /php-src/ext/session mod_files.c Log: MFH: Added missing open_basedir checks http://cvs.php.net/viewvc.cgi/php-src/ext/session/mod_files.c?r1=1.83.2.9.2.6&r2=1.83.2.9.2.7&diff_format=u Index: php-src/ext/session/mod_files.c diff -u php-src/ext/session/mod_files.c:1.83.2.9.2.6 php-src/ext/session/mod_files.c:1.83.2.9.2.7 --- php-src/ext/session/mod_files.c:1.83.2.9.2.6 Mon Jan 1 09:46:46 2007 +++ php-src/ext/session/mod_files.c Thu Jan 4 23:50:45 2007 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mod_files.c,v 1.83.2.9.2.6 2007/01/01 09:46:46 sebastian Exp $ */ +/* $Id: mod_files.c,v 1.83.2.9.2.7 2007/01/04 23:50:45 iliaa Exp $ */ #include "php.h" @@ -244,6 +244,13 @@ if (*save_path == '\0') { save_path = php_get_temporary_directory(); + + if (PG(safe_mode) && (!php_checkuid(save_path, NULL, CHECKUID_ALLOW_ONLY_DIR))) { + return FAILURE; + } + if (php_check_open_basedir(save_path TSRMLS_CC)) { + return FAILURE; + } } data->fd = -1;

« previous php.cvs (#42555) next »