From 5e35651efc98fd140a454c2dd6c5e826573f9dd6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 17 Jan 2011 11:45:13 -0800 Subject: Protect World Map module, RequestMapItemsAsync, from badly formed URLs. --- OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index f9d28b9..e0f36a2 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -641,7 +641,17 @@ namespace OpenSim.Region.CoreModules.World.WorldMap lock (m_openRequests) m_openRequests.Add(requestID, mrs); - WebRequest mapitemsrequest = WebRequest.Create(httpserver); + WebRequest mapitemsrequest = null; + try + { + mapitemsrequest = WebRequest.Create(httpserver); + } + catch (Exception e) + { + m_log.DebugFormat("[WORLD MAP]: Access to {0} failed with {1}", httpserver, e); + return new OSDMap(); + } + mapitemsrequest.Method = "POST"; mapitemsrequest.ContentType = "application/xml+llsd"; OSDMap RAMap = new OSDMap(); -- cgit v1.1