summaryrefslogtreecommitdiff
path: root/ext/mysql/php_mysql.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-06-04 15:27:05 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-06-04 15:27:05 +0000
commit0b69477a1db2c297d1dd0465c594cba982e9ceef (patch)
tree794806c0cc97655468560d09b40ed8a34ef78c82 /ext/mysql/php_mysql.c
parent08887c2067f5f6bc2cec0655dc484d8a7c45fe93 (diff)
downloadphp-git-0b69477a1db2c297d1dd0465c594cba982e9ceef.tar.gz
MFH: Fixed bug #28632 (Prevent open_basedir bypass in MySQL's LOAD DATA
LOCAL).
Diffstat (limited to 'ext/mysql/php_mysql.c')
-rw-r--r--ext/mysql/php_mysql.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index e6af2cbede..9e91c263cd 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -593,7 +593,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))) {
+ if (PG(open_basedir) && strlen(PG(open_basedir)) && (client_flags & CLIENT_LOCAL_FILES)) {
client_flags ^= CLIENT_LOCAL_FILES;
}