From b1d7d2a625b88d65ec56c8fd83f8f96b145f2e3f Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 31 Jan 2020 15:28:40 +0000 Subject: [PATCH] Debugging for impersonation --- .gitignore | 1 + .../PasswordAuthenticationService.cs | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index f77d9f9079..1b43a58bd4 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ *.dll.build *.dll *.log +.idea # Ignore .user and .suo files as these are user preference specific # http://stackoverflow.com/questions/72298/should-i-add-the-visual-studio-suo-and-user-files-to-source-control diff --git a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs index 0204699074..cba88738ed 100644 --- a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs @@ -115,7 +115,10 @@ namespace OpenSim.Services.AuthenticationService List accounts = m_UserAccountService.GetUserAccountsWhere(UUID.Zero, "UserLevel >= 200"); if (accounts == null || accounts.Count == 0) + { + m_log.DebugFormat("[PASS AUTH]: No suitable gods found"); return String.Empty; + } foreach (UserAccount a in accounts) { @@ -124,6 +127,7 @@ namespace OpenSim.Services.AuthenticationService !data.Data.ContainsKey("passwordHash") || !data.Data.ContainsKey("passwordSalt")) { + m_log.DebugFormat("[PASS AUTH]: {0} {1} has no suitable password set", a.FirstName, a.LastName); continue; } @@ -138,12 +142,12 @@ namespace OpenSim.Services.AuthenticationService 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); -// } + 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);