diff --git a/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs b/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs index 4776240fc..75d412b2e 100644 --- a/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs +++ b/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs @@ -211,9 +211,20 @@ public AuthenticationType AuthenticationMethod return AuthenticationType.Forms; } - return Enum.TryParse(_authOptions.Method, out var enumValue) + var value = Enum.TryParse(_authOptions.Method, out var enumValue) ? enumValue : GetValueEnum("AuthenticationMethod", AuthenticationType.None); + +#pragma warning disable CS0618 // Type or member is obsolete + if (value == AuthenticationType.Basic) +#pragma warning restore CS0618 // Type or member is obsolete + { + SetValue("AuthenticationMethod", AuthenticationType.Forms); + + return AuthenticationType.Forms; + } + + return value; } } @@ -389,6 +400,12 @@ public void MigrateConfigFile() { SetValue("EnableSsl", false); } +#pragma warning disable CS0618 // Type or member is obsolete + if (AuthenticationMethod == AuthenticationType.Basic) +#pragma warning restore CS0618 // Type or member is obsolete + { + SetValue("AuthenticationMethod", AuthenticationType.Forms); + } } private void DeleteOldValues()