From 31baeef469d72a9dc13cf4f56392b9f740f71cba Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 23 May 2009 06:05:20 +0000 Subject: * Pipes requestors IP address through all XmlRpcRequest delegates. This is needed to be able to 'NAT-wrap' the login sequence. * If you have something using XmlRpc that isn't in core, change your method signature from: (XmlRpcRequest request) to: (XmlRpcRequest request, IPEndPoint remoteClient) --- .../Grid/UserServer.Modules/MessageServersConnector.cs | 14 +++++++------- OpenSim/Grid/UserServer.Modules/UserLoginService.cs | 3 ++- OpenSim/Grid/UserServer.Modules/UserManager.cs | 15 ++++++++------- .../UserServerAvatarAppearanceModule.cs | 5 +++-- .../Grid/UserServer.Modules/UserServerFriendsModule.cs | 9 +++++---- 5 files changed, 25 insertions(+), 21 deletions(-) (limited to 'OpenSim/Grid/UserServer.Modules') diff --git a/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs b/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs index 330ced2..f326100 100644 --- a/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs +++ b/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs @@ -166,7 +166,7 @@ namespace OpenSim.Grid.UserServer.Modules } } - public XmlRpcResponse XmlRPCRegisterMessageServer(XmlRpcRequest request) + public XmlRpcResponse XmlRPCRegisterMessageServer(XmlRpcRequest request, IPEndPoint remoteClient) { XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; @@ -187,7 +187,7 @@ namespace OpenSim.Grid.UserServer.Modules } return response; } - public XmlRpcResponse XmlRPCDeRegisterMessageServer(XmlRpcRequest request) + public XmlRpcResponse XmlRPCDeRegisterMessageServer(XmlRpcRequest request, IPEndPoint remoteClient) { XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; @@ -203,7 +203,7 @@ namespace OpenSim.Grid.UserServer.Modules } return response; } - public XmlRpcResponse XmlRPCUserMovedtoRegion(XmlRpcRequest request) + public XmlRpcResponse XmlRPCUserMovedtoRegion(XmlRpcRequest request, IPEndPoint remoteClient) { XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; @@ -430,7 +430,7 @@ namespace OpenSim.Grid.UserServer.Modules } } - public XmlRpcResponse RegionStartup(XmlRpcRequest request) + public XmlRpcResponse RegionStartup(XmlRpcRequest request, IPEndPoint remoteClient) { Hashtable requestData = (Hashtable)request.Params[0]; Hashtable result = new Hashtable(); @@ -449,7 +449,7 @@ namespace OpenSim.Grid.UserServer.Modules return response; } - public XmlRpcResponse RegionShutdown(XmlRpcRequest request) + public XmlRpcResponse RegionShutdown(XmlRpcRequest request, IPEndPoint remoteClient) { Hashtable requestData = (Hashtable)request.Params[0]; Hashtable result = new Hashtable(); @@ -468,7 +468,7 @@ namespace OpenSim.Grid.UserServer.Modules return response; } - public XmlRpcResponse AgentLocation(XmlRpcRequest request) + public XmlRpcResponse AgentLocation(XmlRpcRequest request, IPEndPoint remoteClient) { Hashtable requestData = (Hashtable)request.Params[0]; Hashtable result = new Hashtable(); @@ -489,7 +489,7 @@ namespace OpenSim.Grid.UserServer.Modules return response; } - public XmlRpcResponse AgentLeaving(XmlRpcRequest request) + public XmlRpcResponse AgentLeaving(XmlRpcRequest request, IPEndPoint remoteClient) { Hashtable requestData = (Hashtable)request.Params[0]; Hashtable result = new Hashtable(); diff --git a/OpenSim/Grid/UserServer.Modules/UserLoginService.cs b/OpenSim/Grid/UserServer.Modules/UserLoginService.cs index 9eb8743..8fd9c6d 100644 --- a/OpenSim/Grid/UserServer.Modules/UserLoginService.cs +++ b/OpenSim/Grid/UserServer.Modules/UserLoginService.cs @@ -28,6 +28,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Net; using System.Reflection; using System.Text.RegularExpressions; using log4net; @@ -368,7 +369,7 @@ namespace OpenSim.Grid.UserServer.Modules return true; } - public XmlRpcResponse XmlRPCSetLoginParams(XmlRpcRequest request) + public XmlRpcResponse XmlRPCSetLoginParams(XmlRpcRequest request, IPEndPoint remoteClient) { XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; diff --git a/OpenSim/Grid/UserServer.Modules/UserManager.cs b/OpenSim/Grid/UserServer.Modules/UserManager.cs index 6f2720a..8fb3de5 100644 --- a/OpenSim/Grid/UserServer.Modules/UserManager.cs +++ b/OpenSim/Grid/UserServer.Modules/UserManager.cs @@ -28,6 +28,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Net; using System.Reflection; using log4net; using Nwc.XmlRpc; @@ -201,7 +202,7 @@ namespace OpenSim.Grid.UserServer.Modules #region XMLRPC User Methods - public XmlRpcResponse XmlRPCGetAvatarPickerAvatar(XmlRpcRequest request) + public XmlRpcResponse XmlRPCGetAvatarPickerAvatar(XmlRpcRequest request, IPEndPoint remoteClient) { // XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; @@ -218,7 +219,7 @@ namespace OpenSim.Grid.UserServer.Modules return AvatarPickerListtoXmlRPCResponse(queryID, returnAvatar); } - public XmlRpcResponse XmlRPCAtRegion(XmlRpcRequest request) + public XmlRpcResponse XmlRPCAtRegion(XmlRpcRequest request, IPEndPoint remoteClient) { XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; @@ -253,7 +254,7 @@ namespace OpenSim.Grid.UserServer.Modules return response; } - public XmlRpcResponse XmlRPCGetUserMethodName(XmlRpcRequest request) + public XmlRpcResponse XmlRPCGetUserMethodName(XmlRpcRequest request, IPEndPoint remoteClient) { // XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; @@ -290,7 +291,7 @@ namespace OpenSim.Grid.UserServer.Modules return ProfileToXmlRPCResponse(userProfile); } - public XmlRpcResponse XmlRPCGetUserMethodUUID(XmlRpcRequest request) + public XmlRpcResponse XmlRPCGetUserMethodUUID(XmlRpcRequest request, IPEndPoint remoteClient) { // XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; @@ -323,7 +324,7 @@ namespace OpenSim.Grid.UserServer.Modules return ProfileToXmlRPCResponse(userProfile); } - public XmlRpcResponse XmlRPCGetAgentMethodUUID(XmlRpcRequest request) + public XmlRpcResponse XmlRPCGetAgentMethodUUID(XmlRpcRequest request, IPEndPoint remoteClient) { XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; @@ -372,7 +373,7 @@ namespace OpenSim.Grid.UserServer.Modules return response; } - public XmlRpcResponse XmlRpcResponseXmlRPCUpdateUserProfile(XmlRpcRequest request) + public XmlRpcResponse XmlRpcResponseXmlRPCUpdateUserProfile(XmlRpcRequest request, IPEndPoint remoteClient) { m_log.Debug("[UserManager]: Got request to update user profile"); XmlRpcResponse response = new XmlRpcResponse(); @@ -565,7 +566,7 @@ namespace OpenSim.Grid.UserServer.Modules return response; } - public XmlRpcResponse XmlRPCLogOffUserMethodUUID(XmlRpcRequest request) + public XmlRpcResponse XmlRPCLogOffUserMethodUUID(XmlRpcRequest request, IPEndPoint remoteClient) { XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; diff --git a/OpenSim/Grid/UserServer.Modules/UserServerAvatarAppearanceModule.cs b/OpenSim/Grid/UserServer.Modules/UserServerAvatarAppearanceModule.cs index 4ed8597..a7ebc85 100644 --- a/OpenSim/Grid/UserServer.Modules/UserServerAvatarAppearanceModule.cs +++ b/OpenSim/Grid/UserServer.Modules/UserServerAvatarAppearanceModule.cs @@ -28,6 +28,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Net; using System.Reflection; using log4net; using Nwc.XmlRpc; @@ -70,7 +71,7 @@ namespace OpenSim.Grid.UserServer.Modules m_httpServer.AddXmlRPCHandler("update_avatar_appearance", XmlRPCUpdateAvatarAppearance); } - public XmlRpcResponse XmlRPCGetAvatarAppearance(XmlRpcRequest request) + public XmlRpcResponse XmlRPCGetAvatarAppearance(XmlRpcRequest request, IPEndPoint remoteClient) { XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; @@ -101,7 +102,7 @@ namespace OpenSim.Grid.UserServer.Modules return response; } - public XmlRpcResponse XmlRPCUpdateAvatarAppearance(XmlRpcRequest request) + public XmlRpcResponse XmlRPCUpdateAvatarAppearance(XmlRpcRequest request, IPEndPoint remoteClient) { XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; diff --git a/OpenSim/Grid/UserServer.Modules/UserServerFriendsModule.cs b/OpenSim/Grid/UserServer.Modules/UserServerFriendsModule.cs index 1684eb7..c860834 100644 --- a/OpenSim/Grid/UserServer.Modules/UserServerFriendsModule.cs +++ b/OpenSim/Grid/UserServer.Modules/UserServerFriendsModule.cs @@ -28,6 +28,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Net; using System.Reflection; using log4net; using Nwc.XmlRpc; @@ -93,7 +94,7 @@ namespace OpenSim.Grid.UserServer.Modules return response; } - public XmlRpcResponse XmlRpcResponseXmlRPCAddUserFriend(XmlRpcRequest request) + public XmlRpcResponse XmlRpcResponseXmlRPCAddUserFriend(XmlRpcRequest request, IPEndPoint remoteClient) { XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; @@ -115,7 +116,7 @@ namespace OpenSim.Grid.UserServer.Modules return response; } - public XmlRpcResponse XmlRpcResponseXmlRPCRemoveUserFriend(XmlRpcRequest request) + public XmlRpcResponse XmlRpcResponseXmlRPCRemoveUserFriend(XmlRpcRequest request, IPEndPoint remoteClient) { XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; @@ -135,7 +136,7 @@ namespace OpenSim.Grid.UserServer.Modules return response; } - public XmlRpcResponse XmlRpcResponseXmlRPCUpdateUserFriendPerms(XmlRpcRequest request) + public XmlRpcResponse XmlRpcResponseXmlRPCUpdateUserFriendPerms(XmlRpcRequest request, IPEndPoint remoteClient) { XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; @@ -156,7 +157,7 @@ namespace OpenSim.Grid.UserServer.Modules return response; } - public XmlRpcResponse XmlRpcResponseXmlRPCGetUserFriendList(XmlRpcRequest request) + public XmlRpcResponse XmlRpcResponseXmlRPCGetUserFriendList(XmlRpcRequest request, IPEndPoint remoteClient) { // XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; -- cgit v1.1