mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
Allow load/save iar password checks to be done in grid mode
This should allow load/save iar to work for grid mode as long as the grid user service is later than this revision Grid services of earlier revisions will always erroneously report incorrect password. This will be addressed shortly.
This commit is contained in:
@@ -322,7 +322,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
/// <param name="pass">User password</param>
|
||||
/// <returns></returns>
|
||||
protected CachedUserInfo GetUserInfo(string firstName, string lastName, string pass)
|
||||
{
|
||||
{
|
||||
CachedUserInfo userInfo = m_aScene.CommsManager.UserProfileCacheService.GetUserDetails(firstName, lastName);
|
||||
//m_aScene.CommsManager.UserService.GetUserProfile(firstName, lastName);
|
||||
if (null == userInfo)
|
||||
@@ -333,29 +333,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
return null;
|
||||
}
|
||||
|
||||
string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(pass) + ":" + userInfo.UserProfile.PasswordSalt);
|
||||
|
||||
if (userInfo.UserProfile.PasswordHash == null || userInfo.UserProfile.PasswordHash == String.Empty)
|
||||
if (m_aScene.CommsManager.UserService.AuthenticateUserByPassword(userInfo.UserProfile.ID, pass))
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[INVENTORY ARCHIVER]: Sorry, the grid mode service is not providing password hash details for the check. This will be fixed in an OpenSim git revision soon");
|
||||
|
||||
return null;
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
// m_log.DebugFormat(
|
||||
// "[INVENTORY ARCHIVER]: received salt {0}, hash {1}, supplied hash {2}",
|
||||
// userInfo.UserProfile.PasswordSalt, userInfo.UserProfile.PasswordHash, md5PasswdHash);
|
||||
|
||||
if (userInfo.UserProfile.PasswordHash != md5PasswdHash)
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[INVENTORY ARCHIVER]: Password for user {0} {1} incorrect. Please try again.",
|
||||
firstName, lastName);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user