From a8b28efe43cfa4beac62c98b4d9553ba80070972 Mon Sep 17 00:00:00 2001 From: Archi Date: Fri, 3 Feb 2023 02:29:55 +0100 Subject: [PATCH] ASFB HttpClientHandler improvements We should increase our security by checking against revoked SSL certificates, just in case. When using proxy, pre-authenticating makes sense since if user provided the credentials, we can be pretty sure they're required and save a roundtrip. --- ArchiSteamFarm/Web/WebBrowser.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ArchiSteamFarm/Web/WebBrowser.cs b/ArchiSteamFarm/Web/WebBrowser.cs index 179a9c597..0f75be3dd 100644 --- a/ArchiSteamFarm/Web/WebBrowser.cs +++ b/ArchiSteamFarm/Web/WebBrowser.cs @@ -71,10 +71,12 @@ public sealed class WebBrowser : IDisposable { AutomaticDecompression = DecompressionMethods.All, #endif + CheckCertificateRevocationList = true, CookieContainer = CookieContainer }; if (webProxy != null) { + HttpClientHandler.PreAuthenticate = true; HttpClientHandler.Proxy = webProxy; HttpClientHandler.UseProxy = true; }