mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Made LOAD DATA LOCAL INFILE more secure
Docs/manual.texi: Changelog sql/sql_yacc.yy: optimization BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
This commit is contained in:
@ -1796,13 +1796,20 @@ mysql_execute_command(void)
|
||||
{
|
||||
uint privilege= (lex->duplicates == DUP_REPLACE ?
|
||||
INSERT_ACL | UPDATE_ACL | DELETE_ACL : INSERT_ACL);
|
||||
if (!(lex->local_file && (thd->client_capabilities & CLIENT_LOCAL_FILES)))
|
||||
|
||||
if (!lex->local_file)
|
||||
{
|
||||
if (check_access(thd,privilege | FILE_ACL,tables->db))
|
||||
goto error;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(thd->client_capabilities & CLIENT_LOCAL_FILES) ||
|
||||
! opt_local_infile)
|
||||
{
|
||||
send_error(&thd->net,ER_NOT_ALLOWED_COMMAND);
|
||||
goto error;
|
||||
}
|
||||
if (check_access(thd,privilege,tables->db,&tables->grant.privilege) ||
|
||||
grant_option && check_grant(thd,privilege,tables))
|
||||
goto error;
|
||||
|
Reference in New Issue
Block a user