mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 04:03: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:
parent
ce18bcbbc8
commit
b5041dae96
@ -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,19 +2105,25 @@ 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])
|
||||||
{
|
{
|
||||||
iscLogStatus("Authentication error", &status);
|
case isc_missing_data_structures:
|
||||||
Arg::Gds loginError(isc_login_error);
|
case isc_login:
|
||||||
#ifdef DEV_BUILD
|
|
||||||
loginError << Arg::StatusVector(&status);
|
|
||||||
#endif
|
|
||||||
LocalStatus tmp;
|
|
||||||
loginError.copyTo(&tmp);
|
|
||||||
port->send_response(send, 0, 0, &tmp, false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
port->send_response(send, 0, 0, &status, false);
|
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
|
else
|
||||||
port->send(send);
|
port->send(send);
|
||||||
|
Loading…
Reference in New Issue
Block a user