check XFF headers of caller, but be quiet about them

0.9.0-post-fixes
UbitUmarov 2017-05-22 22:04:20 +01:00
parent 4da5d249d8
commit 24885819fc
3 changed files with 8 additions and 8 deletions

View File

@ -225,8 +225,8 @@ namespace OpenSim.Server.Handlers.MapImage
private System.Net.IPAddress GetCallerIP(IOSHttpRequest request)
{
if (!m_Proxy)
return request.RemoteIPEndPoint.Address;
// if (!m_Proxy)
// return request.RemoteIPEndPoint.Address;
// We're behind a proxy
string xff = "X-Forwarded-For";
@ -236,7 +236,7 @@ namespace OpenSim.Server.Handlers.MapImage
if (xffValue == null || (xffValue != null && xffValue == string.Empty))
{
m_log.WarnFormat("[MAP IMAGE HANDLER]: No XFF header");
// m_log.WarnFormat("[MAP IMAGE HANDLER]: No XFF header");
return request.RemoteIPEndPoint.Address;
}

View File

@ -229,8 +229,8 @@ namespace OpenSim.Server.Handlers.MapImage
private System.Net.IPAddress GetCallerIP(IOSHttpRequest request)
{
if (!m_Proxy)
return request.RemoteIPEndPoint.Address;
// if (!m_Proxy)
// return request.RemoteIPEndPoint.Address;
// We're behind a proxy
string xff = "X-Forwarded-For";
@ -240,7 +240,7 @@ namespace OpenSim.Server.Handlers.MapImage
if (xffValue == null || (xffValue != null && xffValue == string.Empty))
{
m_log.WarnFormat("[MAP IMAGE HANDLER]: No XFF header");
// m_log.WarnFormat("[MAP IMAGE HANDLER]: No XFF header");
return request.RemoteIPEndPoint.Address;
}

View File

@ -531,11 +531,11 @@ namespace OpenSim.Server.Handlers.Simulation
if (!headers.ContainsKey(xff) || headers[xff] == null)
{
m_log.WarnFormat("[AGENT HANDLER]: No XFF header");
// m_log.WarnFormat("[AGENT HANDLER]: No XFF header");
return Util.GetCallerIP(request);
}
m_log.DebugFormat("[AGENT HANDLER]: XFF is {0}", headers[xff]);
// m_log.DebugFormat("[AGENT HANDLER]: XFF is {0}", headers[xff]);
IPEndPoint ep = Util.GetClientIPFromXFF((string)headers[xff]);
if (ep != null)