8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 21:23:04 +01:00

Fixed CORE-5686: Firebird 3.0.2 allows any protocol version >= 10 to connect, including interbase protocol 14

This commit is contained in:
AlexPeshkoff 2017-12-21 13:15:45 +03:00
parent 7f0b70618c
commit f8631ec5c8

View File

@ -1814,8 +1814,9 @@ static bool accept_connection(rem_port* port, P_CNCT* connect, PACKET* send)
for (const p_cnct::p_cnct_repeat* const end = protocol + connect->p_cnct_count;
protocol < end; protocol++)
{
if ((protocol->p_cnct_version >= PROTOCOL_VERSION10 &&
protocol->p_cnct_version <= PROTOCOL_VERSION16) &&
if ((protocol->p_cnct_version == PROTOCOL_VERSION10 ||
(protocol->p_cnct_version >= PROTOCOL_VERSION11 &&
protocol->p_cnct_version <= PROTOCOL_VERSION16)) &&
(protocol->p_cnct_architecture == arch_generic ||
protocol->p_cnct_architecture == ARCHITECTURE) &&
protocol->p_cnct_weight >= weight)