aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs6
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs7
2 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 3818a50..297c9b2 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -323,7 +323,13 @@ namespace OpenSim
323 m_standaloneAuthenticate); 323 m_standaloneAuthenticate);
324 m_loginService.OnLoginToRegion += backendService.AddNewSession; 324 m_loginService.OnLoginToRegion += backendService.AddNewSession;
325 325
326 // XMLRPC action
326 m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); 327 m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);
328
329 // provides the web form login
330 m_httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin);
331
332 // Provides the LLSD login
327 m_httpServer.SetLLSDHandler(m_loginService.LLSDLoginMethod); 333 m_httpServer.SetLLSDHandler(m_loginService.LLSDLoginMethod);
328 334
329 if (m_standaloneAuthenticate) 335 if (m_standaloneAuthenticate)
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index 2c92491..38f1970 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -103,12 +103,17 @@ namespace OpenSim.Region.Communications.Local
103 { 103 {
104 MainLog.Instance.Notice( 104 MainLog.Instance.Notice(
105 "LOGIN", "Authenticating " + profile.username + " " + profile.surname); 105 "LOGIN", "Authenticating " + profile.username + " " + profile.surname);
106
107 if (!password.StartsWith("$1$"))
108 password = "$1$" + Util.Md5Hash(password);
106 109
107 password = password.Remove(0, 3); //remove $1$ 110 password = password.Remove(0, 3); //remove $1$
108 111
109 string s = Util.Md5Hash(password + ":" + profile.passwordSalt); 112 string s = Util.Md5Hash(password + ":" + profile.passwordSalt);
110 113
111 return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase); 114 bool loginresult = (profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase)
115 || profile.passwordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase));
116 return loginresult;
112 } 117 }
113 } 118 }
114 119