From 60644b440bef062eedd22cdc59d801ba015402c1 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 8 Jul 2018 13:26:41 +0100 Subject: [PATCH] we don't use tab simbol, we use 4 whitespaces --- .../HypergridService/GatekeeperService.cs | 26 ++++++++-------- .../Services/LLLoginService/LLLoginService.cs | 30 +++++++++---------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 019bab8513..2dae6b74f9 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -62,7 +62,7 @@ namespace OpenSim.Services.HypergridService private static string m_AllowedClients = string.Empty; private static string m_DeniedClients = string.Empty; - private static string m_DeniedMacs = string.Empty; + private static string m_DeniedMacs = string.Empty; private static bool m_ForeignAgentsAllowed = true; private static List m_ForeignsAllowedExceptions = new List(); private static List m_ForeignsDisallowedExceptions = new List(); @@ -138,7 +138,7 @@ namespace OpenSim.Services.HypergridService config, "AllowedClients", possibleAccessControlConfigSections, string.Empty); m_DeniedClients = Util.GetConfigVarFromSections( config, "DeniedClients", possibleAccessControlConfigSections, string.Empty); - m_DeniedMacs = Util.GetConfigVarFromSections( + m_DeniedMacs = Util.GetConfigVarFromSections( config, "DeniedMacs", possibleAccessControlConfigSections, string.Empty); m_ForeignAgentsAllowed = serverConfig.GetBoolean("ForeignAgentsAllowed", true); @@ -278,8 +278,8 @@ namespace OpenSim.Services.HypergridService (source == null) ? "Unknown" : string.Format("{0} ({1}){2}", source.RegionName, source.RegionID, (source.RawServerURI == null) ? "" : " @ " + source.ServerURI)); string curViewer = Util.GetViewerName(aCircuit); - string curMac = aCircuit.Mac.ToString(); - + string curMac = aCircuit.Mac.ToString(); + // // Check client @@ -309,17 +309,17 @@ namespace OpenSim.Services.HypergridService return false; } } - - if (m_DeniedMacs != string.Empty) - { - m_log.InfoFormat("[GATEKEEPER SERVICE]: Checking users Mac {0} against list of denied macs {1} ...", curMac, m_DeniedMacs); - if (m_DeniedMacs.Contains(curMac)) - { - reason = "Login failed: client with Mac " + curMac + " is denied"; + + if (m_DeniedMacs != string.Empty) + { + m_log.InfoFormat("[GATEKEEPER SERVICE]: Checking users Mac {0} against list of denied macs {1} ...", curMac, m_DeniedMacs); + if (m_DeniedMacs.Contains(curMac)) + { + reason = "Login failed: client with Mac " + curMac + " is denied"; m_log.InfoFormat("[GATEKEEPER SERVICE]: Login failed, reason: client with mac {0} is denied", curMac); return false; - } - } + } + } // // Authenticate the user diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index e2cb5d015e..a57c9a7f02 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -88,7 +88,7 @@ namespace OpenSim.Services.LLLoginService protected string m_AvatarPicker; protected string m_AllowedClients; protected string m_DeniedClients; - protected string m_DeniedMacs; + protected string m_DeniedMacs; protected string m_MessageUrl; protected string m_DSTZone; protected bool m_allowDuplicatePresences = false; @@ -135,7 +135,7 @@ namespace OpenSim.Services.LLLoginService config, "AllowedClients", possibleAccessControlConfigSections, string.Empty); m_DeniedClients = Util.GetConfigVarFromSections( config, "DeniedClients", possibleAccessControlConfigSections, string.Empty); - m_DeniedMacs = Util.GetConfigVarFromSections( + m_DeniedMacs = Util.GetConfigVarFromSections( config, "DeniedMacs", possibleAccessControlConfigSections, string.Empty); m_MessageUrl = m_LoginServerConfig.GetString("MessageUrl", string.Empty); @@ -293,8 +293,8 @@ namespace OpenSim.Services.LLLoginService m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}, Possible LibOMVGridProxy: {8} ", firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0, LibOMVclient.ToString()); - - string curMac = mac.ToString(); + + string curMac = mac.ToString(); try { @@ -328,17 +328,17 @@ namespace OpenSim.Services.LLLoginService return LLFailedLoginResponse.LoginBlockedProblem; } } - - if (m_DeniedMacs != string.Empty) - { - m_log.InfoFormat("[LLOGIN SERVICE]: Checking users Mac {0} against list of denied macs {1} ...", curMac, m_DeniedMacs); - if (m_DeniedMacs.Contains(curMac)) - { - m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: client with mac {0} is denied", curMac); - return LLFailedLoginResponse.LoginBlockedProblem; - } - } - + + if (m_DeniedMacs != string.Empty) + { + m_log.InfoFormat("[LLOGIN SERVICE]: Checking users Mac {0} against list of denied macs {1} ...", curMac, m_DeniedMacs); + if (m_DeniedMacs.Contains(curMac)) + { + m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: client with mac {0} is denied", curMac); + return LLFailedLoginResponse.LoginBlockedProblem; + } + } + // // Get the account and check that it exists