From d15a71e0a2ef264093514934553586c12192dbda Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Mon, 28 Sep 2026 15:46:07 +0200 Subject: [PATCH] [core,proxy] fix inverted validity check --- libfreerdp/core/proxy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libfreerdp/core/proxy.c b/libfreerdp/core/proxy.c index d91609085359..14686e0e8637 100644 --- a/libfreerdp/core/proxy.c +++ b/libfreerdp/core/proxy.c @@ -643,7 +643,7 @@ static BOOL http_proxy_connect(rdpContext* context, BIO* bufferedBio, const char // Check for IPv6 (max 45) or DNS (max 255) name. Bounded length to 256 so too long hostnames do // not silently pass const size_t hostLen = strnlen(hostname, 255 + 1); - if (!is_ipv6_addr(hostname, hostLen) || !winpr_str_is_valid_urlN(hostname, hostLen)) + if (!is_ipv6_addr(hostname, hostLen) && !winpr_str_is_valid_urlN(hostname, hostLen)) return FALSE; if (_itoa_s(port, port_str, sizeof(port_str), 10) < 0) @@ -961,7 +961,7 @@ static BOOL socks_proxy_connect(rdpContext* context, BIO* bufferedBio, const cha // Check for IPv6 (max 45) or DNS (max 255) name. Bounded length to 256 so too long hostnames do // not silently pass const size_t hostnlen = strnlen(hostname, 255 + 1); - if (!is_ipv6_addr(hostname, hostnlen) || !winpr_str_is_valid_urlN(hostname, hostnlen)) + if (!is_ipv6_addr(hostname, hostnlen) && !winpr_str_is_valid_urlN(hostname, hostnlen)) return FALSE; BYTE nauthMethods = 1;