aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/AuthenticationService
diff options
context:
space:
mode:
authorJohn Hurliman2010-02-22 14:10:19 -0800
committerJohn Hurliman2010-02-22 14:10:19 -0800
commit71c6559a91a58d93588dcdd8c74b5fce0c1a3780 (patch)
treecca5b1ea88ad4b29156767afdd77e37ec072c8a7 /OpenSim/Services/AuthenticationService
parent* Adds CreatorID to asset metadata. This is just the plumbing to support Crea... (diff)
parentMerge branch 'presence-refactor' of ssh://diva@opensimulator.org/var/git/open... (diff)
downloadopensim-SC-71c6559a91a58d93588dcdd8c74b5fce0c1a3780.zip
opensim-SC-71c6559a91a58d93588dcdd8c74b5fce0c1a3780.tar.gz
opensim-SC-71c6559a91a58d93588dcdd8c74b5fce0c1a3780.tar.bz2
opensim-SC-71c6559a91a58d93588dcdd8c74b5fce0c1a3780.tar.xz
Merge branch 'presence-refactor' of ssh://opensimulator.org/var/git/opensim into presence-refactor
Diffstat (limited to 'OpenSim/Services/AuthenticationService')
-rw-r--r--OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs b/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs
index f6dd085..9af61a9 100644
--- a/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs
+++ b/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs
@@ -106,12 +106,17 @@ namespace OpenSim.Services.AuthenticationService
106 string passwordSalt = Util.Md5Hash(UUID.Random().ToString()); 106 string passwordSalt = Util.Md5Hash(UUID.Random().ToString());
107 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + passwordSalt); 107 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + passwordSalt);
108 108
109 AuthenticationData auth = new AuthenticationData(); 109 AuthenticationData auth = m_Database.Get(principalID);
110 auth.PrincipalID = principalID; 110 if (auth == null)
111 auth.Data = new System.Collections.Generic.Dictionary<string, object>(); 111 {
112 auth = new AuthenticationData();
113 auth.PrincipalID = principalID;
114 auth.Data = new System.Collections.Generic.Dictionary<string, object>();
115 auth.Data["accountType"] = "UserAccount";
116 auth.Data["webLoginKey"] = UUID.Zero.ToString();
117 }
112 auth.Data["passwordHash"] = md5PasswdHash; 118 auth.Data["passwordHash"] = md5PasswdHash;
113 auth.Data["passwordSalt"] = passwordSalt; 119 auth.Data["passwordSalt"] = passwordSalt;
114 auth.Data["webLoginKey"] = UUID.Zero.ToString();
115 if (!m_Database.Store(auth)) 120 if (!m_Database.Store(auth))
116 { 121 {
117 m_log.DebugFormat("[AUTHENTICATION DB]: Failed to store authentication data"); 122 m_log.DebugFormat("[AUTHENTICATION DB]: Failed to store authentication data");