aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2009-09-24 14:54:12 +0100
committerJustin Clark-Casey (justincc)2009-09-24 14:54:12 +0100
commit7870152d23db4cb6f5834d4921fac17feb717220 (patch)
treeccfd000db77de790908b6480785c78151859886b /OpenSim/Region/CoreModules/Avatar
parentMerge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-7870152d23db4cb6f5834d4921fac17feb717220.zip
opensim-SC-7870152d23db4cb6f5834d4921fac17feb717220.tar.gz
opensim-SC-7870152d23db4cb6f5834d4921fac17feb717220.tar.bz2
opensim-SC-7870152d23db4cb6f5834d4921fac17feb717220.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs21
1 files changed, 5 insertions, 16 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index 196205c..b82b940 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -322,7 +322,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
322 /// <param name="pass">User password</param> 322 /// <param name="pass">User password</param>
323 /// <returns></returns> 323 /// <returns></returns>
324 protected CachedUserInfo GetUserInfo(string firstName, string lastName, string pass) 324 protected CachedUserInfo GetUserInfo(string firstName, string lastName, string pass)
325 { 325 {
326 CachedUserInfo userInfo = m_aScene.CommsManager.UserProfileCacheService.GetUserDetails(firstName, lastName); 326 CachedUserInfo userInfo = m_aScene.CommsManager.UserProfileCacheService.GetUserDetails(firstName, lastName);
327 //m_aScene.CommsManager.UserService.GetUserProfile(firstName, lastName); 327 //m_aScene.CommsManager.UserService.GetUserProfile(firstName, lastName);
328 if (null == userInfo) 328 if (null == userInfo)
@@ -333,29 +333,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
333 return null; 333 return null;
334 } 334 }
335 335
336 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(pass) + ":" + userInfo.UserProfile.PasswordSalt); 336 if (m_aScene.CommsManager.UserService.AuthenticateUserByPassword(userInfo.UserProfile.ID, pass))
337
338 if (userInfo.UserProfile.PasswordHash == null || userInfo.UserProfile.PasswordHash == String.Empty)
339 { 337 {
340 m_log.ErrorFormat( 338 return userInfo;
341 "[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");
342
343 return null;
344 } 339 }
345 340 else
346// m_log.DebugFormat(
347// "[INVENTORY ARCHIVER]: received salt {0}, hash {1}, supplied hash {2}",
348// userInfo.UserProfile.PasswordSalt, userInfo.UserProfile.PasswordHash, md5PasswdHash);
349
350 if (userInfo.UserProfile.PasswordHash != md5PasswdHash)
351 { 341 {
352 m_log.ErrorFormat( 342 m_log.ErrorFormat(
353 "[INVENTORY ARCHIVER]: Password for user {0} {1} incorrect. Please try again.", 343 "[INVENTORY ARCHIVER]: Password for user {0} {1} incorrect. Please try again.",
354 firstName, lastName); 344 firstName, lastName);
345
355 return null; 346 return null;
356 } 347 }
357
358 return userInfo;
359 } 348 }
360 349
361 /// <summary> 350 /// <summary>