* This update enables the web_login method.

* Remember, the client doesn't support web_login to other grids in the current RC, however the next RC will.
This commit is contained in:
Teravus Ovares
2008-01-09 22:05:28 +00:00
parent 49fe4eb3cd
commit 85fe8ed085
6 changed files with 210 additions and 20 deletions

View File

@@ -323,7 +323,13 @@ namespace OpenSim
m_standaloneAuthenticate);
m_loginService.OnLoginToRegion += backendService.AddNewSession;
// XMLRPC action
m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);
// provides the web form login
m_httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin);
// Provides the LLSD login
m_httpServer.SetLLSDHandler(m_loginService.LLSDLoginMethod);
if (m_standaloneAuthenticate)

View File

@@ -103,12 +103,17 @@ namespace OpenSim.Region.Communications.Local
{
MainLog.Instance.Notice(
"LOGIN", "Authenticating " + profile.username + " " + profile.surname);
if (!password.StartsWith("$1$"))
password = "$1$" + Util.Md5Hash(password);
password = password.Remove(0, 3); //remove $1$
string s = Util.Md5Hash(password + ":" + profile.passwordSalt);
return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase);
bool loginresult = (profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase)
|| profile.passwordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase));
return loginresult;
}
}