aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2009-09-30 13:36:03 +0100
committerMelanie2009-09-30 13:36:03 +0100
commit1006a2254c733655bf11d3cf25e41d1b43bd5f6a (patch)
tree9fe65879f968137e5350535ab81044b90341f9b1 /OpenSim
parentMerge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-1006a2254c733655bf11d3cf25e41d1b43bd5f6a.zip
opensim-SC-1006a2254c733655bf11d3cf25e41d1b43bd5f6a.tar.gz
opensim-SC-1006a2254c733655bf11d3cf25e41d1b43bd5f6a.tar.bz2
opensim-SC-1006a2254c733655bf11d3cf25e41d1b43bd5f6a.tar.xz
Make create user to the Right Thing with regard to salting user passwords
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 1abd733..86238b1 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -650,15 +650,17 @@ namespace OpenSim.Framework.Communications
650 public virtual UUID AddUser( 650 public virtual UUID AddUser(
651 string firstName, string lastName, string password, string email, uint regX, uint regY, UUID SetUUID) 651 string firstName, string lastName, string password, string email, uint regX, uint regY, UUID SetUUID)
652 { 652 {
653 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty);
654 653
655 UserProfileData user = new UserProfileData(); 654 UserProfileData user = new UserProfileData();
655
656 user.PasswordSalt = Util.Md5Hash(UUID.Random().ToString());
657 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + user.PasswordSalt);
658
656 user.HomeLocation = new Vector3(128, 128, 100); 659 user.HomeLocation = new Vector3(128, 128, 100);
657 user.ID = SetUUID; 660 user.ID = SetUUID;
658 user.FirstName = firstName; 661 user.FirstName = firstName;
659 user.SurName = lastName; 662 user.SurName = lastName;
660 user.PasswordHash = md5PasswdHash; 663 user.PasswordHash = md5PasswdHash;
661 user.PasswordSalt = String.Empty;
662 user.Created = Util.UnixTimeSinceEpoch(); 664 user.Created = Util.UnixTimeSinceEpoch();
663 user.HomeLookAt = new Vector3(100, 100, 100); 665 user.HomeLookAt = new Vector3(100, 100, 100);
664 user.HomeRegionX = regX; 666 user.HomeRegionX = regX;