From b925a9248b11823f834a139a7af106aaea1ca087 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Mon, 18 Jun 2007 21:51:32 +0000 Subject: Fix INFILE LOCAL option handling with MySQL - now not allowed when open_basedir or safe_mode is active --- ext/mysql/php_mysql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/mysql/php_mysql.c') 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; } -- cgit v1.2.1