mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
* 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:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user