diff options
author | Stanislav Malyshev <stas@php.net> | 2007-06-18 21:51:32 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2007-06-18 21:51:32 +0000 |
commit | b925a9248b11823f834a139a7af106aaea1ca087 (patch) | |
tree | 0e36467556f8f85275c687a0c3b778344a1f15c8 /ext/mysql/php_mysql.c | |
parent | 210f09102202f96f5b0ef04bed6544741aaa703a (diff) | |
download | php-git-b925a9248b11823f834a139a7af106aaea1ca087.tar.gz |
Fix INFILE LOCAL option handling with MySQL - now not allowed when open_basedir
or safe_mode is active
Diffstat (limited to 'ext/mysql/php_mysql.c')
-rw-r--r-- | ext/mysql/php_mysql.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index 172249665d..35b9dc66c1 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -603,7 +603,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) break; } /* disable local infile option for open_basedir */ - if (PG(open_basedir) && strlen(PG(open_basedir)) && (client_flags & CLIENT_LOCAL_FILES)) { + if (((PG(open_basedir) && PG(open_basedir)[0] != '\0') || PG(safe_mode)) && (client_flags & CLIENT_LOCAL_FILES)) { client_flags ^= CLIENT_LOCAL_FILES; } |