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

Fixed #7723: Wrong error message on login if the user doesn't exist and WireCrypt is disabled

(cherry picked from commit f049b6fb7e)
This commit is contained in:
AlexPeshkoff 2023-08-28 17:11:01 +03:00
parent ce18bcbbc8
commit b5041dae96

View File

@ -730,8 +730,13 @@ public:
if (st.hasData()) if (st.hasData())
{ {
if (st.getErrors()[1] == isc_missing_data_structures) switch (st.getErrors()[1])
{
case isc_missing_data_structures:
case isc_login:
status_exception::raise(&st); status_exception::raise(&st);
break;
}
iscLogStatus("Authentication error", &st); iscLogStatus("Authentication error", &st);
Arg::Gds loginError(isc_login_error); Arg::Gds loginError(isc_login_error);
@ -2100,7 +2105,14 @@ static bool accept_connection(rem_port* port, P_CNCT* connect, PACKET* send)
HANDSHAKE_DEBUG(fprintf(stderr, "!accepted, sending reject\n")); HANDSHAKE_DEBUG(fprintf(stderr, "!accepted, sending reject\n"));
if (status.getState() & Firebird::IStatus::STATE_ERRORS) if (status.getState() & Firebird::IStatus::STATE_ERRORS)
{ {
if (status.getErrors()[1] != isc_missing_data_structures) switch (status.getErrors()[1])
{
case isc_missing_data_structures:
case isc_login:
port->send_response(send, 0, 0, &status, false);
break;
default:
{ {
iscLogStatus("Authentication error", &status); iscLogStatus("Authentication error", &status);
Arg::Gds loginError(isc_login_error); Arg::Gds loginError(isc_login_error);
@ -2111,8 +2123,7 @@ static bool accept_connection(rem_port* port, P_CNCT* connect, PACKET* send)
loginError.copyTo(&tmp); loginError.copyTo(&tmp);
port->send_response(send, 0, 0, &tmp, false); port->send_response(send, 0, 0, &tmp, false);
} }
else }
port->send_response(send, 0, 0, &status, false);
} }
else else
port->send(send); port->send(send);