diff --git a/libxrdp/xrdp_caps.c b/libxrdp/xrdp_caps.c index 9ecf2486..88371029 100644 --- a/libxrdp/xrdp_caps.c +++ b/libxrdp/xrdp_caps.c @@ -424,16 +424,23 @@ xrdp_caps_process_input(struct xrdp_rdp *self, struct stream *s, } // We always advertise Unicode support, so if the client supports it too, - // we can use it - if ((inputFlags & INPUT_FLAG_UNICODE) != 0) + // we can use it. + // + // If Unicode support is already active, the CAPSTYPE_INPUT + // PDU has been received as part of a Deactivation-Reactivation sequence. + // In this case, ignore the flag. + if (self->client_info.unicode_input_support != UIS_ACTIVE) { - self->client_info.unicode_input_support = UIS_SUPPORTED; - LOG(LOG_LEVEL_INFO, "Client supports Unicode input"); - } - else - { - self->client_info.unicode_input_support = UIS_UNSUPPORTED; - LOG(LOG_LEVEL_INFO, "Client does not support Unicode input"); + if ((inputFlags & INPUT_FLAG_UNICODE) != 0) + { + self->client_info.unicode_input_support = UIS_SUPPORTED; + LOG(LOG_LEVEL_INFO, "Client supports Unicode input"); + } + else + { + self->client_info.unicode_input_support = UIS_UNSUPPORTED; + LOG(LOG_LEVEL_INFO, "Client does not support Unicode input"); + } } return 0;