mirror of
https://github.com/MariaDB/server.git
synced 2026-05-05 06:35:33 +02:00
Bug#45412 SHOW CREATE TRIGGER does not require privileges to disclose trigger data
Added privilege checking to SHOW CREATE TRIGGER code. mysql-test/r/trigger_notembedded.result: test result mysql-test/t/trigger_notembedded.test: test case sql/sql_show.cc: Added privilege checking to SHOW CREATE TRIGGER code.
This commit is contained in:
parent
1d9b7877fc
commit
5eab9716ba
3 changed files with 43 additions and 0 deletions
|
|
@ -7071,6 +7071,12 @@ bool show_create_trigger(THD *thd, const sp_name *trg_name)
|
|||
if (!lst)
|
||||
return TRUE;
|
||||
|
||||
if (check_table_access(thd, TRIGGER_ACL, lst, 1, TRUE))
|
||||
{
|
||||
my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), "TRIGGER");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
Open the table by name in order to load Table_triggers_list object.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue