mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-26647 (reuse info) Include password validation plugin information in the error message if the SQL statement is not satisfied password policy
send information about password reusing
This commit is contained in:
@@ -108,9 +108,17 @@ static int run_query_with_table_creation(MYSQL *mysql, const char *query,
|
||||
unsigned int rc= mysql_errno(mysql);
|
||||
if (rc != ER_NO_SUCH_TABLE)
|
||||
{
|
||||
// suppress this error in case of try to add the same password twice
|
||||
if (rc != ER_DUP_ENTRY)
|
||||
{
|
||||
report_sql_error(mysql);
|
||||
}
|
||||
else
|
||||
{
|
||||
// warning used to do not change error code
|
||||
my_printf_error(ER_NOT_VALID_PASSWORD,
|
||||
"password_reuse_check: The password was already used",
|
||||
ME_WARNING);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (create_table(mysql))
|
||||
|
Reference in New Issue
Block a user