stas            Mon Jun 18 22:01:56 2007 UTC

  Modified files:              (Branch: PHP_4_4)
    /php-src/ext/mysql  php_mysql.c 
  Log:
  Fix INFILE LOCAL option handling with MySQL - now not allowed when safe_mode
  is active
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.174.2.29.2.4&r2=1.174.2.29.2.5&diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.174.2.29.2.4 
php-src/ext/mysql/php_mysql.c:1.174.2.29.2.5
--- php-src/ext/mysql/php_mysql.c:1.174.2.29.2.4        Thu Jun  7 12:17:53 2007
+++ php-src/ext/mysql/php_mysql.c       Mon Jun 18 22:01:56 2007
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
  
-/* $Id: php_mysql.c,v 1.174.2.29.2.4 2007/06/07 12:17:53 tony2001 Exp $ */
+/* $Id: php_mysql.c,v 1.174.2.29.2.5 2007/06/18 22:01:56 stas Exp $ */
 
 /* TODO:
  *
@@ -595,8 +595,8 @@
                                WRONG_PARAM_COUNT;
                                break;
                }
-               /* disable local infile option for open_basedir */
-               if (PG(open_basedir) && strlen(PG(open_basedir)) && 
(client_flags & CLIENT_LOCAL_FILES)) {
+               /* disable local infile option for open_basedir and safe_mode */
+               if (((PG(open_basedir) && PG(open_basedir)[0] != '\0') || 
PG(safe_mode)) && (client_flags & CLIENT_LOCAL_FILES)) {
                        client_flags ^= CLIENT_LOCAL_FILES;
                }
 

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

Reply via email to