From 1108d88fc48071dec7db560176713f418393237e Mon Sep 17 00:00:00 2001 From: akarl10 Date: Tue, 27 Jun 2023 16:27:30 +0200 Subject: [PATCH] [gateway,wst] make WWW-Authenticate: NTLM (without data) work again This happens in wst.c because the first try is always anonymous --- libfreerdp/core/gateway/http.c | 5 ++++- libfreerdp/core/gateway/wst.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libfreerdp/core/gateway/http.c b/libfreerdp/core/gateway/http.c index f0ae245e9..5f8237921 100644 --- a/libfreerdp/core/gateway/http.c +++ b/libfreerdp/core/gateway/http.c @@ -797,7 +797,8 @@ static BOOL http_response_parse_header_field(HttpResponse* response, const char* if (!authScheme) return FALSE; - authValue = NULL; + /* it is not possible to store NULL in a ListDirectory */ + authValue = ""; } status = ListDictionary_Add(response->Authenticates, authScheme, authValue); @@ -919,7 +920,9 @@ static BOOL http_response_parse_header(HttpResponse* response) } if (!http_response_parse_header_field(response, name, value)) + { goto fail; + } *end_of_header = end_of_header_char; } diff --git a/libfreerdp/core/gateway/wst.c b/libfreerdp/core/gateway/wst.c index f51949dab..4888d68d3 100644 --- a/libfreerdp/core/gateway/wst.c +++ b/libfreerdp/core/gateway/wst.c @@ -717,7 +717,7 @@ static BOOL wst_parse_url(rdpWst* wst, const char* url) { if (strncmp("https://", url, 8) != 0) { - WLog_ERR(TAG, "Websocket URL is invalid. Only wss:// URLs are supported"); + WLog_ERR(TAG, "Websocket URL is invalid. Only wss:// or https:// URLs are supported"); return FALSE; } else