mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Check for Mono legacy TLS
This commit is contained in:
@@ -153,5 +153,32 @@ namespace Jackett.Server
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void CheckEnvironmentalVariables(Logger logger)
|
||||||
|
{
|
||||||
|
//Check the users environmental variables to ensure they aren't using Mono legacy TLS
|
||||||
|
|
||||||
|
var enumerator = Environment.GetEnvironmentVariables().GetEnumerator();
|
||||||
|
while (enumerator.MoveNext())
|
||||||
|
{
|
||||||
|
if (enumerator.Key.ToString().Equals("MONO_TLS_PROVIDER", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
logger.Info("MONO_TLS_PROVIDER is present with a value of: " + enumerator.Value.ToString());
|
||||||
|
|
||||||
|
if (enumerator.Value.ToString().IndexOf("legacy", StringComparison.OrdinalIgnoreCase) >= 0)
|
||||||
|
{
|
||||||
|
logger.Error("The MONO_TLS_PROVIDER=legacy environment variable is not supported, please remove it.");
|
||||||
|
Environment.Exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (enumerator.Key.ToString().IndexOf("MONO_", StringComparison.OrdinalIgnoreCase) >= 0)
|
||||||
|
{
|
||||||
|
logger.Info($"Environment variable {enumerator.Key} is present");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -82,6 +82,7 @@ namespace Jackett.Server
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Initialisation.CheckEnvironmentalVariables(logger);
|
||||||
Initialisation.ProcessSettings(Settings, logger);
|
Initialisation.ProcessSettings(Settings, logger);
|
||||||
|
|
||||||
ISerializeService serializeService = new SerializeService();
|
ISerializeService serializeService = new SerializeService();
|
||||||
|
Reference in New Issue
Block a user