1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-25 06:39:48 +03:00

16 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
7a5ad92e5f Fix collation error when checking for grant permission
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2025-09-22 17:40:39 -03:00
Maurício Meneghini Fauth
016fb0c095 Revert "Fix #19109 - Do not enforce character encoding when checking roles"
This reverts commit 0878841fba.

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2025-09-17 20:15:41 -03:00
Daniel Schindler
0878841fba Fix #19109 - Do not enforce character encoding when checking roles
The functions `getInformationSchemaDataForCreateRequest()` and `getInformationSchemaDataForGranteeRequest()` generate a query that fails with the error `COLLATION 'utf8mb4_general_ci' is not valid for CHARACTER SET 'utf8mb3'` on some servers that got migrated from MySql 5.7. This lead to admin users not being able to create new users via PhpMyAdmin's UI. Instead, the error message "You do not have the privileges to administrate the users!" is being shown. When not forcing the encoding to `utf8mb4_general_ci` in the query, everything works fine.

Signed-off-by: Daniel Schindler<post@danielschindler.de>
2025-09-14 18:48:52 +02:00
Luca Camillo
78335aac87 Add role based auth for MySQL 8.x and compatibles (#18814)
* add role based auth for mysql 8.x or compatible like mariadb/aws rds aurora mysql

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

* Using cache and check server version

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

* implement tests for getCurrentRolesAndHost / getCurrentRoles functions

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

* fix role checks on mariadb

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

* Simplify code + ignore NONE as result of CURRENT_ROLE()

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>

* Fix tests

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>

Fixes #18782

---------

Signed-off-by: Luca Camillo <luca.camillo@gmail.com>
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Co-authored-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-03-02 19:31:03 -03:00
Maurício Meneghini Fauth
3e0856c77b Remove useless string concatenations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-27 21:40:22 -03:00
Maurício Meneghini Fauth
f00d70cccb Remove useless whitespaces
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-15 17:05:40 -03:00
William Desportes
7aabad9b7a Move queries from Operations class to the Query\Generator class
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-03-06 02:11:25 +01:00
Maurício Meneghini Fauth
d83abf63e7 Use PSR-12 for control structures spacing
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-05 15:27:03 -03:00
Maurício Meneghini Fauth
0b8edc5bde Use PSR-12 for namespace use statements
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-05 14:18:35 -03:00
William Desportes
2bc0b80cb9 Fix a phpdoc block and a coding standard issue
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-01-31 01:23:46 +01:00
Kartik Kathuria
b2039444bf Fixes #14953 - Added Rename Button to use RENAME INDEX syntax of MySQL
Co-Authored-By: William Desportes <williamdes@wdes.fr>

Signed-off-by: Kartik Kathuria <kathuriakartik0@gmail.com>
2020-11-05 15:22:16 +01:00
William Desportes
36fa925914 Extract SQL query from DatabaseInterface::getColumnsFull
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-31 15:08:36 +02:00
William Desportes
73fb678d08 Extract SQL query from DatabaseInterface::getDatabasesFull
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-31 15:01:58 +02:00
William Desportes
7e9d2ae4f9 Move more SQL queries into Query\Generator
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-31 02:16:02 +02:00
Maurício Meneghini Fauth
199e3d9813 Fix coding standard issues
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-27 21:08:55 -03:00
William Desportes
4d61ef2313 Split some code out of DatabaseInterface
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-26 13:18:01 +02:00