mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 03:23:03 +01:00
Backported CORE-5822: Wrong error returned to client when WireCrypt=Disabled is used
This commit is contained in:
parent
ceda2bd05a
commit
9686b3a689
@ -1779,12 +1779,7 @@ public:
|
|||||||
static void setErrorStatus(IStatus* status)
|
static void setErrorStatus(IStatus* status)
|
||||||
{
|
{
|
||||||
Arg::Gds loginError(isc_login);
|
Arg::Gds loginError(isc_login);
|
||||||
#ifndef DEV_BUILD
|
if (!(status->getState() & IStatus::STATE_ERRORS))
|
||||||
if (status->getErrors()[1] == isc_missing_data_structures)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
loginError << Arg::StatusVector(status->getErrors());
|
|
||||||
}
|
|
||||||
status->setErrors(loginError.value());
|
status->setErrors(loginError.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2004,12 +1999,27 @@ static bool accept_connection(rem_port* port, P_CNCT* connect, PACKET* send)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Send off out gracious acceptance or flag rejection
|
// Send off out gracious acceptance or flag rejection
|
||||||
if (!accepted)
|
if (!accepted)
|
||||||
{
|
{
|
||||||
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)
|
||||||
|
{
|
||||||
|
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_response(send, 0, 0, &status, false);
|
port->send_response(send, 0, 0, &status, false);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
port->send(send);
|
port->send(send);
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user