<div dir="ltr">Hi all,<div><br></div><div>Following queries are used to assess whether the logged in user has super, create user and grant privileges respectively. See [1]<br clear="all"><div><br></div><div>SELECT 1 FROM mysql.user LIMIT 1<br></div><div><div>SELECT 1 FROM INFORMATION_SCHEMA.USER_PRIVILEGES WHERE PRIVILEGE_TYPE = 'CREATE USER' LIMIT 1</div></div><div><div>SELECT 1 FROM INFORMATION_SCHEMA.USER_PRIVILEGES WHERE IS_GRANTABLE = 'YES' LIMIT 1</div></div><div><br></div><div>However, if I create a user with all global privileges except for 'GRANT', 'SUPER', and 'CREATE USER' privileges all the above queries return 1 since the queries does not check for the grantee column. Rows corresponding to root user make all these queries return 1.</div><div><br></div><div>This obviously looks a bug to me. I'm writing to make sure that I'm not missing out on something obvious.</div><div><br></div><div>[1] <a href="https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/DatabaseInterface.class.php#L1917">https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/DatabaseInterface.class.php#L1917</a></div><div><br></div><div><br></div>-- <br>Thanks and Regards,<div><br></div><div>Madhura Jayaratne<br><div><br></div></div>
</div></div>