]> granicus.if.org Git - php/commitdiff
fixed #23779 (CLIENT_LOCAL_FILES with open_basedir)
authorGeorg Richter <georg@php.net>
Fri, 30 May 2003 13:00:17 +0000 (13:00 +0000)
committerGeorg Richter <georg@php.net>
Fri, 30 May 2003 13:00:17 +0000 (13:00 +0000)
ext/mysql/php_mysql.c

index 4ff77fc29419e153712000c841dff73a5c3e3ec6..14ba53f6c1bb92653c6b530b66c8cede07de9323 100644 (file)
@@ -557,6 +557,11 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                                WRONG_PARAM_COUNT;
                                break;
                }
+               /* disable local infile option for open_basedir */
+               if (strlen(PG(open_basedir))) {
+                       client_flags ^= CLIENT_LOCAL_FILES;
+               }
+
                if (z_host) {
                        SEPARATE_ZVAL(z_host); /* We may modify z_host if it contains a port, separate */
                        convert_to_string_ex(z_host);