Merge pull request #5899 from akallabeth/respect_abort_connect

End connection before user callbacks if aborted.
This commit is contained in:
Martin Fleisz 2020-02-20 08:32:50 +01:00 committed by GitHub
commit 428234012f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 0 deletions

View File

@ -145,6 +145,9 @@ BOOL rpc_ncacn_http_ntlm_init(rdpContext* context, RpcChannel* channel)
if (!settings->GatewayPassword || !settings->GatewayUsername ||
!strlen(settings->GatewayPassword) || !strlen(settings->GatewayUsername))
{
if (freerdp_shall_disconnect(instance))
return FALSE;
if (!instance->GatewayAuthenticate)
{
freerdp_set_last_error_log(context, FREERDP_ERROR_CONNECT_NO_OR_MISSING_CREDENTIALS);

View File

@ -868,6 +868,9 @@ static BOOL rdg_get_gateway_credentials(rdpContext* context)
if (!settings->GatewayPassword || !settings->GatewayUsername ||
!strlen(settings->GatewayPassword) || !strlen(settings->GatewayUsername))
{
if (freerdp_shall_disconnect(instance))
return FALSE;
if (!instance->GatewayAuthenticate)
{
freerdp_set_last_error_log(context, FREERDP_ERROR_CONNECT_NO_OR_MISSING_CREDENTIALS);

View File

@ -133,6 +133,9 @@ int rpc_send_bind_pdu(rdpRpc* rpc)
if (promptPassword)
{
if (freerdp_shall_disconnect(instance))
return -1;
if (!instance->GatewayAuthenticate)
{
freerdp_set_last_error_log(instance->context,

View File

@ -274,6 +274,9 @@ static int nla_client_init(rdpNla* nla)
if (PromptPassword)
{
if (freerdp_shall_disconnect(instance))
return 0;
if (!instance->Authenticate)
{
freerdp_set_last_error_log(instance->context,

View File

@ -1338,6 +1338,9 @@ int tls_verify_certificate(rdpTls* tls, CryptoCert cert, const char* hostname, U
BYTE* pemCert = NULL;
DWORD flags = VERIFY_CERT_FLAG_NONE;
if (freerdp_shall_disconnect(instance))
return -1;
if (!tls_extract_pem(cert, &pemCert, &length))
goto end;