Bug #74733 | SELECT privilege is not checked for views on UPDATE which references to columns | ||
---|---|---|---|
Submitted: | 7 Nov 2014 13:02 | Modified: | 7 Nov 2014 16:11 |
Reporter: | Elena Stepanova | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Security: Privileges | Severity: | S3 (Non-critical) |
Version: | 5.5, 5.6, 5.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[7 Nov 2014 13:02]
Elena Stepanova
[7 Nov 2014 16:11]
MySQL Verification Team
Thank you for the bug report. s supported Collecting tests... Checking leftover processes... Removing old var directory... Creating var directory 'C:/2014.11.02/mysql-5.6/mysql-test/var'... Installing system database... ============================================================================== TEST RESULT TIME (ms) or COMMENT -------------------------------------------------------------------------- worker[1] Using MTR_BUILD_THREAD 301, with reserved ports 13010..13019 CREATE DATABASE privtest_db; CREATE TABLE privtest_db.t1 (a INT); CREATE VIEW privtest_db.v1 AS SELECT * FROM privtest_db.t1; CREATE USER 'privtest'@'localhost'; INSERT INTO privtest_db.t1 VALUES (1), (2), (3); connect con1,localhost,privtest,,; connection default; GRANT UPDATE ON privtest_db.t1 TO 'privtest'@'localhost'; connection con1; UPDATE privtest_db.t1 SET a = a + 1; ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 't1' UPDATE privtest_db.t1 SET a = 10 WHERE a > 3; ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 't1' connection default; REVOKE ALL ON privtest_db.t1 FROM 'privtest'@'localhost'; GRANT UPDATE ON privtest_db.v1 TO 'privtest'@'localhost'; connection con1; UPDATE privtest_db.v1 SET a = a + 1; UPDATE privtest_db.v1 SET a = 10 WHERE a > 3;