From e2b2061ee1531f3320f79d9a1503d6cf2faebb91 Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Thu, 14 Jan 2021 22:04:54 +0100 Subject: [PATCH] Fixed: Unnecessary certificate validation errors on localhost/loopback (cherry picked from commit c28cafba0a1b92f065541ebdae9db06ab1e5ac82) --- .../Security/X509CertificateValidationService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/NzbDrone.Core/Security/X509CertificateValidationService.cs b/src/NzbDrone.Core/Security/X509CertificateValidationService.cs index 450f4ceaf..6d505ca0a 100644 --- a/src/NzbDrone.Core/Security/X509CertificateValidationService.cs +++ b/src/NzbDrone.Core/Security/X509CertificateValidationService.cs @@ -41,6 +41,11 @@ private bool ShouldByPassValidationError(object sender, X509Certificate certific return true; } + if (request.RequestUri.Host == "localhost" || request.RequestUri.Host == "127.0.0.1") + { + return true; + } + var ipAddresses = GetIPAddresses(request.RequestUri.Host); var certificateValidation = _configService.CertificateValidation;