From 2a1e45f65736214a9e8d782be1f92bb78725121f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 15 May 2010 19:25:14 -0700 Subject: Finalized the client's TCP IP address verification process for HG1.5. --- OpenSim/Framework/Capabilities/Caps.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework/Capabilities/Caps.cs') diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs index b27d011..62a1e17 100644 --- a/OpenSim/Framework/Capabilities/Caps.cs +++ b/OpenSim/Framework/Capabilities/Caps.cs @@ -99,6 +99,7 @@ namespace OpenSim.Framework.Capabilities // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule. //private string eventQueue = "0100/"; + private IScene m_Scene; private IHttpServer m_httpListener; private UUID m_agentID; private IAssetService m_assetCache; @@ -130,9 +131,10 @@ namespace OpenSim.Framework.Capabilities public FetchInventoryDescendentsCAPS CAPSFetchInventoryDescendents = null; public GetClientDelegate GetClient = null; - public Caps(IAssetService assetCache, IHttpServer httpServer, string httpListen, uint httpPort, string capsPath, + public Caps(IScene scene, IAssetService assetCache, IHttpServer httpServer, string httpListen, uint httpPort, string capsPath, UUID agent, bool dumpAssetsToFile, string regionName) { + m_Scene = scene; m_assetCache = assetCache; m_capsObjectPath = capsPath; m_httpListener = httpServer; @@ -278,7 +280,13 @@ namespace OpenSim.Framework.Capabilities public string CapsRequest(string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) { - //m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName); + m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName); + + if (!m_Scene.CheckClient(m_agentID, httpRequest.RemoteIPEndPoint)) + { + m_log.DebugFormat("[CAPS]: Unauthorized CAPS client"); + return string.Empty; + } string result = LLSDHelpers.SerialiseLLSDReply(m_capsHandlers.CapsDetails); -- cgit v1.1