MXS-585: Fixed buffer length instead of packet length being used in a calculation
The usage of the buffer length in the authentication success checks causes the authentication to fail with routers that don't require statement input.
This commit is contained in:
@ -771,7 +771,9 @@ int gw_read_client_event(DCB* dcb)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stmt_input)
|
/** If the router requires statement input or we are still authenticating
|
||||||
|
* we need to make sure that a complete SQL packet is read before continuing */
|
||||||
|
if (stmt_input || protocol->protocol_auth_state == MYSQL_AUTH_SENT)
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -832,9 +834,8 @@ int gw_read_client_event(DCB* dcb)
|
|||||||
{
|
{
|
||||||
case MYSQL_AUTH_SENT:
|
case MYSQL_AUTH_SENT:
|
||||||
{
|
{
|
||||||
int auth_val;
|
read_buffer = gwbuf_make_contiguous(read_buffer);
|
||||||
|
int auth_val = gw_mysql_do_authentication(dcb, &read_buffer);
|
||||||
auth_val = gw_mysql_do_authentication(dcb, &read_buffer);
|
|
||||||
|
|
||||||
if (protocol->protocol_auth_state == MYSQL_AUTH_SSL_REQ ||
|
if (protocol->protocol_auth_state == MYSQL_AUTH_SSL_REQ ||
|
||||||
protocol->protocol_auth_state == MYSQL_AUTH_SSL_HANDSHAKE_ONGOING ||
|
protocol->protocol_auth_state == MYSQL_AUTH_SSL_HANDSHAKE_ONGOING ||
|
||||||
|
Reference in New Issue
Block a user