Fix impersonation, it got broken in a merge
parent
4b3cb91ce8
commit
d8f6faa89e
|
@ -103,6 +103,8 @@ namespace OpenSim.Services.AuthenticationService
|
||||||
if ((user.UserFlags & impersonateFlag) == 0)
|
if ((user.UserFlags & impersonateFlag) == 0)
|
||||||
return String.Empty;
|
return String.Empty;
|
||||||
|
|
||||||
|
m_log.DebugFormat("[PASS AUTH]: Attempting impersonation");
|
||||||
|
|
||||||
List<UserAccount> accounts = m_UserAccountService.GetUserAccountsWhere(UUID.Zero, "UserLevel >= 200");
|
List<UserAccount> accounts = m_UserAccountService.GetUserAccountsWhere(UUID.Zero, "UserLevel >= 200");
|
||||||
if (accounts == null || accounts.Count == 0)
|
if (accounts == null || accounts.Count == 0)
|
||||||
return String.Empty;
|
return String.Empty;
|
||||||
|
@ -117,6 +119,8 @@ namespace OpenSim.Services.AuthenticationService
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// m_log.DebugFormat("[PASS AUTH]: Trying {0}", data.PrincipalID);
|
||||||
|
|
||||||
hashed = Util.Md5Hash(password + ":" +
|
hashed = Util.Md5Hash(password + ":" +
|
||||||
data.Data["passwordSalt"].ToString());
|
data.Data["passwordSalt"].ToString());
|
||||||
|
|
||||||
|
@ -125,13 +129,12 @@ namespace OpenSim.Services.AuthenticationService
|
||||||
m_log.DebugFormat("[PASS AUTH]: {0} {1} impersonating {2}, proceeding with login", a.FirstName, a.LastName, principalID);
|
m_log.DebugFormat("[PASS AUTH]: {0} {1} impersonating {2}, proceeding with login", a.FirstName, a.LastName, principalID);
|
||||||
return GetToken(principalID, lifetime);
|
return GetToken(principalID, lifetime);
|
||||||
}
|
}
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
"[AUTH SERVICE]: Salted hash {0} of given password did not match salted hash of {1} for PrincipalID {2}. Authentication failure.",
|
// "[AUTH SERVICE]: Salted hash {0} of given password did not match salted hash of {1} for PrincipalID {2}. Authentication failure.",
|
||||||
hashed, data.Data["passwordHash"], principalID);
|
// hashed, data.Data["passwordHash"], data.PrincipalID);
|
||||||
return String.Empty;
|
// }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.DebugFormat("[PASS AUTH]: Impersonation of {0} failed", principalID);
|
m_log.DebugFormat("[PASS AUTH]: Impersonation of {0} failed", principalID);
|
||||||
|
|
Loading…
Reference in New Issue