mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-24 21:46:52 +01:00
Further sanity
This commit is contained in:
@@ -113,12 +113,16 @@ namespace TGCommandLine
|
||||
return result;
|
||||
}
|
||||
|
||||
static bool AcceptedBadCert = false;
|
||||
static bool BadCertificateInteractive(string message)
|
||||
{
|
||||
if (AcceptedBadCert)
|
||||
return true;
|
||||
Console.WriteLine(message);
|
||||
Console.Write("Do you wish to continue? NOT RECCOMENDED! (y/N): ");
|
||||
var result = Console.ReadLine().Trim().ToLower();
|
||||
return result == "y" || result == "yes";
|
||||
AcceptedBadCert = result == "y" || result == "yes";
|
||||
return AcceptedBadCert;
|
||||
}
|
||||
|
||||
static int Main(string[] args)
|
||||
@@ -169,11 +173,13 @@ namespace TGCommandLine
|
||||
{
|
||||
Console.WriteLine("Unable to connect: " + res);
|
||||
Server.MakeLocalConnection();
|
||||
AcceptedBadCert = false;
|
||||
}
|
||||
else if (!Server.Authenticate())
|
||||
{
|
||||
Console.WriteLine("Authentication error: Username/password/windows identity is not authorized! Returning to local mode...");
|
||||
Server.MakeLocalConnection();
|
||||
AcceptedBadCert = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user