The LongCredentials capability were not parsed or used
authorDavid Fort <contact@hardening-consulting.com>
Wed, 1 Mar 2017 23:39:08 +0000 (00:39 +0100)
committerDavid Fort <contact@hardening-consulting.com>
Wed, 1 Mar 2017 23:39:08 +0000 (00:39 +0100)
libfreerdp/core/capabilities.c
libfreerdp/core/settings.c

index 55ad6db..b717992 100644 (file)
@@ -193,10 +193,10 @@ static BOOL rdp_read_general_capability_set(wStream* s, UINT16 length,
        Stream_Seek_UINT16(s); /* remoteUnshareFlag (2 bytes) */
        Stream_Seek_UINT16(s); /* generalCompressionLevel (2 bytes) */
        Stream_Read_UINT8(s, refreshRectSupport); /* refreshRectSupport (1 byte) */
-       Stream_Read_UINT8(s,
-                         suppressOutputSupport); /* suppressOutputSupport (1 byte) */
-       settings->NoBitmapCompressionHeader = (extraFlags & NO_BITMAP_COMPRESSION_HDR) ?
-                                             TRUE : FALSE;
+       Stream_Read_UINT8(s, suppressOutputSupport); /* suppressOutputSupport (1 byte) */
+
+       settings->NoBitmapCompressionHeader = (extraFlags & NO_BITMAP_COMPRESSION_HDR) ? TRUE : FALSE;
+       settings->LongCredentialsSupported = (extraFlags & LONG_CREDENTIALS_SUPPORTED) ? TRUE : FALSE;
 
        if (!(extraFlags & FASTPATH_OUTPUT_SUPPORTED))
                settings->FastPathOutput = FALSE;
@@ -237,7 +237,10 @@ static BOOL rdp_write_general_capability_set(wStream* s, rdpSettings* settings)
                return FALSE;
 
        header = rdp_capability_set_start(s);
-       extraFlags = LONG_CREDENTIALS_SUPPORTED;
+       extraFlags = 0;
+
+       if (settings->LongCredentialsSupported)
+               extraFlags |= LONG_CREDENTIALS_SUPPORTED;
 
        if (settings->NoBitmapCompressionHeader)
                extraFlags |= NO_BITMAP_COMPRESSION_HDR;
index 808f331..8c5e768 100644 (file)
@@ -506,6 +506,7 @@ rdpSettings* freerdp_settings_new(DWORD flags)
        settings->GatewayUdpTransport = TRUE;
        settings->FastPathInput = TRUE;
        settings->FastPathOutput = TRUE;
+       settings->LongCredentialsSupported = TRUE;
        settings->FrameAcknowledge = 2;
        settings->MouseMotion = TRUE;
        settings->NSCodecColorLossLevel = 3;