8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 21:23: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.getErrors()[1] == isc_missing_data_structures)
switch (st.getErrors()[1])
{
case isc_missing_data_structures:
case isc_login:
status_exception::raise(&st);
break;
}
iscLogStatus("Authentication error", &st);
Arg::Gds loginError(isc_login_error);
@ -2100,19 +2105,25 @@ static bool accept_connection(rem_port* port, P_CNCT* connect, PACKET* send)
HANDSHAKE_DEBUG(fprintf(stderr, "!accepted, sending reject\n"));
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
{
if (status.getErrors()[1] != isc_missing_data_structures)
switch (status.getErrors()[1])
{
iscLogStatus("Authentication error", &status);
Arg::Gds loginError(isc_login_error);
#ifdef DEV_BUILD
loginError << Arg::StatusVector(&status);
#endif
LocalStatus tmp;
loginError.copyTo(&tmp);
port->send_response(send, 0, 0, &tmp, false);
}
else
case isc_missing_data_structures:
case isc_login:
port->send_response(send, 0, 0, &status, false);
break;
default:
{
iscLogStatus("Authentication error", &status);
Arg::Gds loginError(isc_login_error);
#ifdef DEV_BUILD
loginError << Arg::StatusVector(&status);
#endif
LocalStatus tmp;
loginError.copyTo(&tmp);
port->send_response(send, 0, 0, &tmp, false);
}
}
}
else
port->send(send);