1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-36380 User has unauthorized access to a sequence through a view with security invoker

check sequence privileges in Item_func_nextval::fix_fields(),
just like column privileges are checked in Item_field::fix_fields()

remove sequence specific hacks that kinda made sequence privilege
checks works, but not in all cases. And they were too lax,
didn't requre SELECT privilege for NEXTVAL. Also INSERT privilege looks
wrong here, UPDATE would've been more appropriate, but won't
change that for compatibility reasons.

also fixes

MDEV-36413 User without any privileges to a sequence can read from it and modify it via column default
This commit is contained in:
Sergei Golubchik
2025-04-11 08:28:42 +02:00
parent f89f8aa313
commit f99586668a
11 changed files with 211 additions and 26 deletions

View File

@@ -1,5 +1,4 @@
--source include/have_sequence.inc
--source include/have_innodb.inc
#
# Test sequences with views