mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
Fixed bug #68077 (LOAD DATA LOCAL INFILE / open_basedir restriction)
Actually, this only be fixed if php uses mysqlnd
This commit is contained in:
parent
e5abc53701
commit
be6fd4ba89
8 changed files with 94 additions and 10 deletions
|
@ -799,6 +799,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
|||
passwd_len = passwd? strlen(passwd):0;
|
||||
}
|
||||
|
||||
#if !defined(MYSQL_USE_MYSQLND)
|
||||
/* disable local infile option for open_basedir */
|
||||
#if PHP_API_VERSION < 20100412
|
||||
if (((PG(open_basedir) && PG(open_basedir)[0] != '\0') || PG(safe_mode)) && (client_flags & CLIENT_LOCAL_FILES)) {
|
||||
|
@ -807,6 +808,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
|||
#endif
|
||||
client_flags ^= CLIENT_LOCAL_FILES;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CLIENT_MULTI_RESULTS
|
||||
client_flags |= CLIENT_MULTI_RESULTS; /* compatibility with 5.2, see bug#50416 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue