[server,proxy] fix rdpdr intercept mode

This commit is contained in:
Armin Novak 2022-12-22 11:49:32 +01:00 committed by David Fort
parent 7a95c7343d
commit b988e8fba7
2 changed files with 13 additions and 14 deletions

View File

@ -1720,7 +1720,7 @@ static PfChannelResult pf_rdpdr_back_data(proxyData* pdata,
if (pf_channel_smartcard_client_emulate(pdata->pc))
return PF_CHANNEL_RESULT_DROP;
#endif
return PF_CHANNEL_RESULT_PASS;
return PF_CHANNEL_RESULT_DROP;
}
static PfChannelResult pf_rdpdr_front_data(proxyData* pdata,
@ -1742,7 +1742,7 @@ static PfChannelResult pf_rdpdr_front_data(proxyData* pdata,
if (pf_channel_smartcard_client_emulate(pdata->pc))
return PF_CHANNEL_RESULT_DROP;
#endif
return PF_CHANNEL_RESULT_PASS;
return PF_CHANNEL_RESULT_DROP;
}
BOOL pf_channel_setup_rdpdr(pServerContext* ps, pServerStaticChannelContext* channel)

View File

@ -466,23 +466,22 @@ static BOOL pf_client_receive_channel_data_hook(freerdp* instance, UINT16 channe
switch (channel->onBackData(pdata, channel, xdata, xsize, flags, totalSize))
{
case PF_CHANNEL_RESULT_PASS:
break;
server_channel_id = WTSChannelGetId(ps->context.peer, channel->channel_name);
/* Ignore messages for channels that can not be mapped.
* The client might not have enabled support for this specific channel,
* so just drop the message. */
if (server_channel_id == 0)
return TRUE;
return ps->context.peer->SendChannelPacket(ps->context.peer, server_channel_id,
totalSize, flags, xdata, xsize);
case PF_CHANNEL_RESULT_DROP:
return TRUE;
case PF_CHANNEL_RESULT_ERROR:
default:
return FALSE;
}
server_channel_id = WTSChannelGetId(ps->context.peer, channel->channel_name);
/* Ignore messages for channels that can not be mapped.
* The client might not have enabled support for this specific channel,
* so just drop the message. */
if (server_channel_id == 0)
return TRUE;
return ps->context.peer->SendChannelPacket(ps->context.peer, server_channel_id, totalSize,
flags, xdata, xsize);
}
static BOOL pf_client_on_server_heartbeat(freerdp* instance, BYTE period, BYTE count1, BYTE count2)