Commit ed4ead3a authored by Sergei Golubchik's avatar Sergei Golubchik

lp:982664 there are few broken clients that lie about their capabilities

(for example, one of them sets client capabilities by copying server capabilities)

We cannot fix them - let's tolerate them
parent 806df88c
......@@ -7654,14 +7654,16 @@ static ulong parse_client_handshake_packet(MPVIO_EXT *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
......
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