mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed: Disable SSL when using the removed SslCertHash configuration
(cherry picked from commit d95660d3c78d1ee11a7966d58e78a82a8df01393)
This commit is contained in:
@@ -325,6 +325,20 @@ namespace NzbDrone.Core.Configuration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void MigrateConfigFile()
|
||||||
|
{
|
||||||
|
if (!File.Exists(_configFile))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If SSL is enabled and a cert hash is still in the config file disable SSL
|
||||||
|
if (EnableSsl && GetValue("SslCertHash", null).IsNotNullOrWhiteSpace())
|
||||||
|
{
|
||||||
|
SetValue("EnableSsl", false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void DeleteOldValues()
|
private void DeleteOldValues()
|
||||||
{
|
{
|
||||||
var xDoc = LoadConfigFile();
|
var xDoc = LoadConfigFile();
|
||||||
@@ -396,6 +410,7 @@ namespace NzbDrone.Core.Configuration
|
|||||||
|
|
||||||
public void HandleAsync(ApplicationStartedEvent message)
|
public void HandleAsync(ApplicationStartedEvent message)
|
||||||
{
|
{
|
||||||
|
MigrateConfigFile();
|
||||||
EnsureDefaultConfigFile();
|
EnsureDefaultConfigFile();
|
||||||
DeleteOldValues();
|
DeleteOldValues();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user