From d1baa3e0c3b1783a68061980ffd8b9693c5a474a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 9 Nov 2016 22:39:52 +0000 Subject: fix some invalid string.format arguments --- OpenSim/Services/Connectors/Estate/EstateDataConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs b/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs index 74935f3..b9a6281 100644 --- a/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs +++ b/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs @@ -323,7 +323,7 @@ namespace OpenSim.Services.Connectors } else m_log.Error(string.Format( - "[ESTATE CONNECTOR]: WebException for {0} {1} {2} ", + "[ESTATE CONNECTOR]: WebException for {0} {1} {2} {3}", verb, uri, formdata, e)); } } -- cgit v1.1 From 326821f66ed6286ee8b2ea6f5606d3eb902489fc Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 11 Nov 2016 12:59:43 +0000 Subject: reduce useraccouts cache time --- .../PasswordAuthenticationService.cs | 53 +--------------------- 1 file changed, 2 insertions(+), 51 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs index a9359f3..2e8ffe5 100644 --- a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs @@ -72,11 +72,8 @@ namespace OpenSim.Services.AuthenticationService { realID = UUID.Zero; - m_log.DebugFormat("[AUTH SERVICE]: Authenticating for {0}, user account service present: {1}", principalID, m_UserAccountService != null); + m_log.DebugFormat("[AUTH SERVICE]: Authenticating for {0}", principalID); AuthenticationData data = m_Database.Get(principalID); - UserAccount user = null; - if (m_UserAccountService != null) - user = m_UserAccountService.GetUserAccount(UUID.Zero, principalID); if (data == null || data.Data == null) { @@ -100,53 +97,7 @@ namespace OpenSim.Services.AuthenticationService return GetToken(principalID, lifetime); } - if (user == null) - { - m_log.DebugFormat("[PASS AUTH]: No user record for {0}", principalID); - return String.Empty; - } - - int impersonateFlag = 1 << 6; - - if ((user.UserFlags & impersonateFlag) == 0) - return String.Empty; - - m_log.DebugFormat("[PASS AUTH]: Attempting impersonation"); - - List accounts = m_UserAccountService.GetUserAccountsWhere(UUID.Zero, "UserLevel >= 200"); - if (accounts == null || accounts.Count == 0) - return String.Empty; - - foreach (UserAccount a in accounts) - { - data = m_Database.Get(a.PrincipalID); - if (data == null || data.Data == null || - !data.Data.ContainsKey("passwordHash") || - !data.Data.ContainsKey("passwordSalt")) - { - continue; - } - -// m_log.DebugFormat("[PASS AUTH]: Trying {0}", data.PrincipalID); - - hashed = Util.Md5Hash(password + ":" + - data.Data["passwordSalt"].ToString()); - - if (data.Data["passwordHash"].ToString() == hashed) - { - m_log.DebugFormat("[PASS AUTH]: {0} {1} impersonating {2}, proceeding with login", a.FirstName, a.LastName, principalID); - realID = a.PrincipalID; - return GetToken(principalID, lifetime); - } -// else -// { -// m_log.DebugFormat( -// "[AUTH SERVICE]: Salted hash {0} of given password did not match salted hash of {1} for PrincipalID {2}. Authentication failure.", -// hashed, data.Data["passwordHash"], data.PrincipalID); -// } - } - - m_log.DebugFormat("[PASS AUTH]: Impersonation of {0} failed", principalID); + m_log.DebugFormat("[AUTH SERVICE]: Authenticating FAIL for {0} ", principalID); return String.Empty; } } -- cgit v1.1