Commit 3df7287d authored by Sergei Golubchik's avatar Sergei Golubchik

fix the test for the empty password hash string

because the first byte of a _binary hash_ can be 0x00 too.

This fixes main.connect test on centos73-ppc64
parent 1db6c3a2
...@@ -13583,7 +13583,7 @@ static int old_password_authenticate(MYSQL_PLUGIN_VIO *vio, ...@@ -13583,7 +13583,7 @@ static int old_password_authenticate(MYSQL_PLUGIN_VIO *vio,
pkt_len= (int)strnlen((char*)pkt, pkt_len); pkt_len= (int)strnlen((char*)pkt, pkt_len);
if (pkt_len == 0) /* no password */ if (pkt_len == 0) /* no password */
return info->auth_string[0] ? CR_AUTH_USER_CREDENTIALS : CR_OK; return info->auth_string_length ? CR_AUTH_USER_CREDENTIALS : CR_OK;
if (secure_auth(thd)) if (secure_auth(thd))
return CR_AUTH_HANDSHAKE; return CR_AUTH_HANDSHAKE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment