mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
MDEV-41099 HANDLER READ missing column privilege check
HANDLER OPEN accepted column-level SELECT grants as table access, but HANDLER READ returns all columns and never checked column privileges. Reopen of a handler table (after FLUSH/ALTER) did no checks at all. Require SELECT on every column (as for SELECT *) when the user has no table-level SELECT, and redo the privilege checks on reopen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Oleksandr "Sanja" Byelkin
parent
95c812d807
commit
ead9739532
@@ -5808,6 +5808,7 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
|
||||
There is no need to check for table permissions here, because
|
||||
if a user has no permissions to read a table, he won't be
|
||||
able to open it (with SQLCOM_HA_OPEN) in the first place.
|
||||
On implicit reopen mysql_ha_open() checks privileges again.
|
||||
*/
|
||||
unit->set_limit(select_lex);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user