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)
---
OpenSim/Grid/GridServer.Modules/GridMessagingModule.cs | 5 +++--
OpenSim/Grid/GridServer.Modules/GridXmlRpcModule.cs | 11 ++++++-----
.../Grid/MessagingServer.Modules/MessageRegionModule.cs | 4 ++--
OpenSim/Grid/MessagingServer.Modules/MessageService.cs | 12 ++++++------
.../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 +++++----
9 files changed, 42 insertions(+), 36 deletions(-)
(limited to 'OpenSim/Grid')
diff --git a/OpenSim/Grid/GridServer.Modules/GridMessagingModule.cs b/OpenSim/Grid/GridServer.Modules/GridMessagingModule.cs
index 2f08756..eaf5b86 100644
--- a/OpenSim/Grid/GridServer.Modules/GridMessagingModule.cs
+++ b/OpenSim/Grid/GridServer.Modules/GridMessagingModule.cs
@@ -28,6 +28,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Net;
using System.Reflection;
using System.Text;
using Nwc.XmlRpc;
@@ -98,7 +99,7 @@ namespace OpenSim.Grid.GridServer.Modules
}
}
- public XmlRpcResponse XmlRPCRegisterMessageServer(XmlRpcRequest request)
+ public XmlRpcResponse XmlRPCRegisterMessageServer(XmlRpcRequest request, IPEndPoint remoteClient)
{
XmlRpcResponse response = new XmlRpcResponse();
Hashtable requestData = (Hashtable)request.Params[0];
@@ -120,7 +121,7 @@ namespace OpenSim.Grid.GridServer.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];
diff --git a/OpenSim/Grid/GridServer.Modules/GridXmlRpcModule.cs b/OpenSim/Grid/GridServer.Modules/GridXmlRpcModule.cs
index 14a328f..59fadce 100644
--- a/OpenSim/Grid/GridServer.Modules/GridXmlRpcModule.cs
+++ b/OpenSim/Grid/GridServer.Modules/GridXmlRpcModule.cs
@@ -29,6 +29,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
+using System.Net;
using System.Reflection;
using System.Xml;
using log4net;
@@ -246,7 +247,7 @@ namespace OpenSim.Grid.GridServer.Modules
///
/// The XML RPC Request
/// Startup parameters
- public XmlRpcResponse XmlRpcSimulatorLoginMethod(XmlRpcRequest request)
+ public XmlRpcResponse XmlRpcSimulatorLoginMethod(XmlRpcRequest request, IPEndPoint remoteClient)
{
RegionProfileData sim;
RegionProfileData existingSim;
@@ -575,7 +576,7 @@ namespace OpenSim.Grid.GridServer.Modules
///
/// The XMLRPC Request
/// Processing parameters
- public XmlRpcResponse XmlRpcDeleteRegionMethod(XmlRpcRequest request)
+ public XmlRpcResponse XmlRpcDeleteRegionMethod(XmlRpcRequest request, IPEndPoint remoteClient)
{
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
@@ -631,7 +632,7 @@ namespace OpenSim.Grid.GridServer.Modules
///
///
///
- public XmlRpcResponse XmlRpcSimulatorDataRequestMethod(XmlRpcRequest request)
+ public XmlRpcResponse XmlRpcSimulatorDataRequestMethod(XmlRpcRequest request, IPEndPoint remoteClient)
{
Hashtable requestData = (Hashtable)request.Params[0];
Hashtable responseData = new Hashtable();
@@ -696,7 +697,7 @@ namespace OpenSim.Grid.GridServer.Modules
return response;
}
- public XmlRpcResponse XmlRpcMapBlockMethod(XmlRpcRequest request)
+ public XmlRpcResponse XmlRpcMapBlockMethod(XmlRpcRequest request, IPEndPoint remoteClient)
{
int xmin = 980, ymin = 980, xmax = 1020, ymax = 1020;
@@ -806,7 +807,7 @@ namespace OpenSim.Grid.GridServer.Modules
///
///
///
- public XmlRpcResponse XmlRpcSearchForRegionMethod(XmlRpcRequest request)
+ public XmlRpcResponse XmlRpcSearchForRegionMethod(XmlRpcRequest request, IPEndPoint remoteClient)
{
Hashtable requestData = (Hashtable)request.Params[0];
diff --git a/OpenSim/Grid/MessagingServer.Modules/MessageRegionModule.cs b/OpenSim/Grid/MessagingServer.Modules/MessageRegionModule.cs
index f7ef759..f158591 100644
--- a/OpenSim/Grid/MessagingServer.Modules/MessageRegionModule.cs
+++ b/OpenSim/Grid/MessagingServer.Modules/MessageRegionModule.cs
@@ -181,7 +181,7 @@ namespace OpenSim.Grid.MessagingServer.Modules
return regionProfile;
}
- public XmlRpcResponse RegionStartup(XmlRpcRequest request)
+ public XmlRpcResponse RegionStartup(XmlRpcRequest request, IPEndPoint remoteClient)
{
Hashtable requestData = (Hashtable)request.Params[0];
Hashtable result = new Hashtable();
@@ -195,7 +195,7 @@ namespace OpenSim.Grid.MessagingServer.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();
diff --git a/OpenSim/Grid/MessagingServer.Modules/MessageService.cs b/OpenSim/Grid/MessagingServer.Modules/MessageService.cs
index bff17df..99fe264 100644
--- a/OpenSim/Grid/MessagingServer.Modules/MessageService.cs
+++ b/OpenSim/Grid/MessagingServer.Modules/MessageService.cs
@@ -322,7 +322,7 @@ namespace OpenSim.Grid.MessagingServer.Modules
///
/// UserServer Data
///
- public XmlRpcResponse UserLoggedOn(XmlRpcRequest request)
+ public XmlRpcResponse UserLoggedOn(XmlRpcRequest request, IPEndPoint remoteClient)
{
Hashtable requestData = (Hashtable)request.Params[0];
@@ -370,7 +370,7 @@ namespace OpenSim.Grid.MessagingServer.Modules
///
///
///
- public XmlRpcResponse UserLoggedOff(XmlRpcRequest request)
+ public XmlRpcResponse UserLoggedOff(XmlRpcRequest request, IPEndPoint remoteClient)
{
m_log.Info("[USERLOGOFF]: User logged off called");
Hashtable requestData = (Hashtable)request.Params[0];
@@ -383,7 +383,7 @@ namespace OpenSim.Grid.MessagingServer.Modules
#endregion
- public XmlRpcResponse GetPresenceInfoBulk(XmlRpcRequest request)
+ public XmlRpcResponse GetPresenceInfoBulk(XmlRpcRequest request, IPEndPoint remoteClient)
{
Hashtable paramHash = (Hashtable)request.Params[0];
Hashtable result = new Hashtable();
@@ -426,7 +426,7 @@ namespace OpenSim.Grid.MessagingServer.Modules
}
}
- public XmlRpcResponse AgentLocation(XmlRpcRequest request)
+ public XmlRpcResponse AgentLocation(XmlRpcRequest request, IPEndPoint remoteClient)
{
Hashtable requestData = (Hashtable)request.Params[0];
Hashtable result = new Hashtable();
@@ -441,7 +441,7 @@ namespace OpenSim.Grid.MessagingServer.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();
@@ -455,7 +455,7 @@ namespace OpenSim.Grid.MessagingServer.Modules
return response;
}
- public XmlRpcResponse ProcessRegionShutdown(XmlRpcRequest request)
+ public XmlRpcResponse ProcessRegionShutdown(XmlRpcRequest request, IPEndPoint remoteClient)
{
Hashtable requestData = (Hashtable)request.Params[0];
Hashtable result = new Hashtable();
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