iliaa           Thu Jan  4 23:49:35 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/session        mod_files.c 
  Log:
  
  Added missing open_basedir checks
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/mod_files.c?r1=1.100.2.3.2.3&r2=1.100.2.3.2.4&diff_format=u
Index: php-src/ext/session/mod_files.c
diff -u php-src/ext/session/mod_files.c:1.100.2.3.2.3 
php-src/ext/session/mod_files.c:1.100.2.3.2.4
--- php-src/ext/session/mod_files.c:1.100.2.3.2.3       Mon Jan  1 09:36:05 2007
+++ php-src/ext/session/mod_files.c     Thu Jan  4 23:49:35 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: mod_files.c,v 1.100.2.3.2.3 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: mod_files.c,v 1.100.2.3.2.4 2007/01/04 23:49:35 iliaa Exp $ */
 
 #include "php.h"
 
@@ -251,6 +251,13 @@
        if (*save_path == '\0') {
                /* if save path is an empty string, determine the temporary dir 
*/
                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;
+               }
        }
        
        /* split up input parameter */

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

Reply via email to