From 599b19102e4184e9691e713b79959fe05a5eb0db Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 27 Apr 2019 18:48:23 -0700 Subject: [PATCH] Fixed: Don't allow HTTP and HTTPS to use the same port Closes #2890 --- src/Sonarr.Api.V3/Config/HostConfigModule.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Sonarr.Api.V3/Config/HostConfigModule.cs b/src/Sonarr.Api.V3/Config/HostConfigModule.cs index 121449649..eb9021929 100644 --- a/src/Sonarr.Api.V3/Config/HostConfigModule.cs +++ b/src/Sonarr.Api.V3/Config/HostConfigModule.cs @@ -43,6 +43,7 @@ namespace Sonarr.Api.V3.Config SharedValidator.RuleFor(c => c.Password).NotEmpty().When(c => c.AuthenticationMethod != AuthenticationType.None); SharedValidator.RuleFor(c => c.SslPort).ValidPort().When(c => c.EnableSsl); + SharedValidator.RuleFor(c => c.SslPort).NotEqual(c => c.Port).When(c => c.EnableSsl); SharedValidator.RuleFor(c => c.SslCertHash).NotEmpty().When(c => c.EnableSsl && OsInfo.IsWindows); SharedValidator.RuleFor(c => c.Branch).NotEmpty().WithMessage("Branch name is required, 'master' is the default");