1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for Bug#29605

--local-infile=0 checks can be bypassed by sending a FETCH LOCAL FILE response
  
Add a check for CLIENT_LOCAL_FILES before sending a local file.
Beware, that all binary distributions enable sending of local files and it's up
to the programs which use libmysql to disable it, if they don't use this functionality.
Otherwise they are not safe.
This commit is contained in:
andrey@whirlpool.hristov.com
2008-02-22 18:45:45 +01:00
parent 04b306dad2
commit 07d9c4eeb8
3 changed files with 13 additions and 1 deletions

View File

@ -289,6 +289,8 @@ static void client_connect(ulong flag)
myerror("mysql_init() failed");
exit(1);
}
/* enable local infile, in non-binary builds often disabled by default */
mysql_options(mysql, MYSQL_OPT_LOCAL_INFILE, 0);
if (!(mysql_real_connect(mysql, opt_host, opt_user,
opt_password, opt_db ? opt_db:"test", opt_port,