From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- OpenSim/Server/Handlers/Login/LLLoginHandlers.cs | 19 ++++++++++++------- .../Handlers/Login/LLLoginServiceInConnector.cs | 4 ++-- 2 files changed, 14 insertions(+), 9 deletions(-) (limited to 'OpenSim/Server/Handlers/Login') diff --git a/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs b/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs index f2a5678..4e7ab00 100644 --- a/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs +++ b/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs @@ -53,7 +53,7 @@ namespace OpenSim.Server.Handlers.Login private ILoginService m_LocalService; private bool m_Proxy; - + public LLLoginHandlers(ILoginService service, bool hasProxy) { @@ -64,7 +64,7 @@ namespace OpenSim.Server.Handlers.Login public XmlRpcResponse HandleXMLRPCLogin(XmlRpcRequest request, IPEndPoint remoteClient) { Hashtable requestData = (Hashtable)request.Params[0]; - if (m_Proxy && request.Params[3] != null) + if (request.Params[3] != null) { IPEndPoint ep = Util.GetClientIPFromXFF((string)request.Params[3]); if (ep != null) @@ -132,8 +132,13 @@ namespace OpenSim.Server.Handlers.Login //m_log.InfoFormat("[LOGIN]: XMLRPC Login Requested for {0} {1}, starting in {2}, using {3}", first, last, startLocation, clientVersion); + + bool LibOMVclient = false; + if (request.Params.Count > 4 && (string)request.Params[4] == "gridproxy") + LibOMVclient = true; + LoginResponse reply = null; - reply = m_LocalService.Login(first, last, passwd, startLocation, scopeID, clientVersion, channel, mac, id0, remoteClient); + reply = m_LocalService.Login(first, last, passwd, startLocation, scopeID, clientVersion, channel, mac, id0, remoteClient, LibOMVclient); XmlRpcResponse response = new XmlRpcResponse(); response.Value = reply.ToHashtable(); @@ -216,7 +221,7 @@ namespace OpenSim.Server.Handlers.Login LoginResponse reply = null; reply = m_LocalService.Login(map["first"].AsString(), map["last"].AsString(), map["passwd"].AsString(), startLocation, scopeID, - map["version"].AsString(), map["channel"].AsString(), map["mac"].AsString(), map["id0"].AsString(), remoteClient); + map["version"].AsString(), map["channel"].AsString(), map["mac"].AsString(), map["id0"].AsString(), remoteClient,false); return reply.ToOSDMap(); } @@ -259,7 +264,7 @@ namespace OpenSim.Server.Handlers.Login (sender as WebSocketHttpServerHandler).GetRemoteIPEndpoint(); LoginResponse reply = null; reply = m_LocalService.Login(first, last, passwd, start, scope, version, - channel, mac, id0, endPoint); + channel, mac, id0, endPoint,false); sock.SendMessage(OSDParser.SerializeJsonString(reply.ToOSDMap())); } @@ -274,11 +279,11 @@ namespace OpenSim.Server.Handlers.Login sock.Close("success"); } }; - + sock.HandshakeAndUpgrade(); } - + private XmlRpcResponse FailedXMLRPCResponse() { diff --git a/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs b/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs index f60e892..56ac3c2 100644 --- a/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs +++ b/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs @@ -98,7 +98,7 @@ namespace OpenSim.Server.Handlers.Login m_DosProtectionOptions.ForgetTimeSpan = TimeSpan.FromMilliseconds(serverConfig.GetInt("DOSForgiveClientAfterMS", 120000)); m_DosProtectionOptions.ReportingName = "LOGINDOSPROTECTION"; - + return loginService; } @@ -106,7 +106,7 @@ namespace OpenSim.Server.Handlers.Login private void InitializeHandlers(IHttpServer server) { LLLoginHandlers loginHandlers = new LLLoginHandlers(m_LoginService, m_Proxy); - server.AddXmlRPCHandler("login_to_simulator", + server.AddXmlRPCHandler("login_to_simulator", new XmlRpcBasicDOSProtector(loginHandlers.HandleXMLRPCLogin,loginHandlers.HandleXMLRPCLoginBlocked, m_DosProtectionOptions).Process, false); server.AddXmlRPCHandler("set_login_level", loginHandlers.HandleXMLRPCSetLoginLevel, false); -- cgit v1.1