aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDiva Canto2012-04-27 10:22:43 -0700
committerDiva Canto2012-04-27 10:22:43 -0700
commit292752bb78984c84b4305f32226d7f226092a08a (patch)
tree0b46047eb69b42b6dc85286f1ee15157d6ae98e2 /OpenSim
parentAmend to last commit: account for the existence of proxies. (diff)
downloadopensim-SC_OLD-292752bb78984c84b4305f32226d7f226092a08a.zip
opensim-SC_OLD-292752bb78984c84b4305f32226d7f226092a08a.tar.gz
opensim-SC_OLD-292752bb78984c84b4305f32226d7f226092a08a.tar.bz2
opensim-SC_OLD-292752bb78984c84b4305f32226d7f226092a08a.tar.xz
MapImage security issue: better error messages
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Server/Handlers/Map/MapAddServerConnector.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs
index cc7ef9d..a612114 100644
--- a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs
+++ b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs
@@ -132,16 +132,18 @@ namespace OpenSim.Server.Handlers.MapImage
132 GridRegion r = m_GridService.GetRegionByPosition(UUID.Zero, x * (int)Constants.RegionSize, y * (int)Constants.RegionSize); 132 GridRegion r = m_GridService.GetRegionByPosition(UUID.Zero, x * (int)Constants.RegionSize, y * (int)Constants.RegionSize);
133 if (r != null) 133 if (r != null)
134 { 134 {
135 if (r.ExternalEndPoint.Address != GetCallerIP(httpRequest)) 135 System.Net.IPAddress ipAddr = GetCallerIP(httpRequest);
136 if (r.ExternalEndPoint.Address != ipAddr)
136 { 137 {
137 m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be rogue", httpRequest.RemoteIPEndPoint.Address); 138 m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be trying to impersonate region in IP {1}", ipAddr, r.ExternalEndPoint.Address);
138 return FailureResult("IP address of caller does not match IP address of registered region"); 139 return FailureResult("IP address of caller does not match IP address of registered region");
139 } 140 }
140 141
141 } 142 }
142 else 143 else
143 { 144 {
144 m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be rogue", httpRequest.RemoteIPEndPoint.Address); 145 m_log.WarnFormat("[MAP IMAGE HANDLER]: IP address {0} may be rogue. Region not found at coordinates {1}-{2}",
146 httpRequest.RemoteIPEndPoint.Address, x, y);
145 return FailureResult("Region not found at given coordinates"); 147 return FailureResult("Region not found at given coordinates");
146 } 148 }
147 } 149 }