1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

empty password is a valid password, don't crash

This commit is contained in:
Sergei Golubchik
2018-06-18 21:28:27 +02:00
parent 5f0510225a
commit af2dd582e6
3 changed files with 8 additions and 1 deletions

View File

@ -3864,7 +3864,8 @@ void set_authentication_plugin_from_password(const User_table& user_table,
const char* password,
uint password_length)
{
if (password_length == SCRAMBLED_PASSWORD_CHAR_LENGTH)
if (password_length == SCRAMBLED_PASSWORD_CHAR_LENGTH ||
password_length == 0)
{
user_table.plugin()->store(native_password_plugin_name.str,
native_password_plugin_name.length,