summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 15c3999be54..41c04b9c413 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -8559,14 +8559,16 @@ static ulong parse_client_handshake_packet(MPVIO_EXT *mpvio,
if (find_mpvio_user(mpvio))
return packet_error;
- if (thd->client_capabilities & CLIENT_PLUGIN_AUTH)
+ if ((thd->client_capabilities & CLIENT_PLUGIN_AUTH) &&
+ (client_plugin < (char *)net->read_pos + pkt_len))
{
- if (client_plugin >= (char *)net->read_pos + pkt_len)
- return packet_error;
client_plugin= fix_plugin_ptr(client_plugin);
}
else
{
+ /* Some clients lie. Sad, but true */
+ thd->client_capabilities &= ~CLIENT_PLUGIN_AUTH;
+
if (thd->client_capabilities & CLIENT_SECURE_CONNECTION)
client_plugin= native_password_plugin_name.str;
else