mirror of
https://github.com/Radarr/Radarr.git
synced 2024-07-14 16:55:21 +02:00
Fixed: Disable SSL when using the removed SslCertHash configuration (#9426)
(cherry picked from commit d95660d3c78d1ee11a7966d58e78a82a8df01393) Co-authored-by: Mark McDowall <mark@mcdowall.ca>
This commit is contained in:
parent
22e3cf844c
commit
6c487ead00
@ -323,6 +323,20 @@ public void EnsureDefaultConfigFile()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
@ -394,6 +408,7 @@ private string GenerateApiKey()
|
|||||||
|
|
||||||
public void HandleAsync(ApplicationStartedEvent message)
|
public void HandleAsync(ApplicationStartedEvent message)
|
||||||
{
|
{
|
||||||
|
MigrateConfigFile();
|
||||||
EnsureDefaultConfigFile();
|
EnsureDefaultConfigFile();
|
||||||
DeleteOldValues();
|
DeleteOldValues();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user