diff --git a/server/proxy/channels/pf_channel_rdpdr.c b/server/proxy/channels/pf_channel_rdpdr.c index 8b7832e95..92ee58dd2 100644 --- a/server/proxy/channels/pf_channel_rdpdr.c +++ b/server/proxy/channels/pf_channel_rdpdr.c @@ -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) diff --git a/server/proxy/pf_client.c b/server/proxy/pf_client.c index 6d3ca0443..efbfe401c 100644 --- a/server/proxy/pf_client.c +++ b/server/proxy/pf_client.c @@ -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)