From aaf8fff57e85a8f164c4ab27c5e126e91a81027f Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Mon, 7 Jul 2008 11:25:09 +0000 Subject: adding support for IP EndPoint whitelisting in HttpServer code. --- OpenSim/Framework/Servers/OSHttpRequestPump.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework/Servers/OSHttpRequestPump.cs') diff --git a/OpenSim/Framework/Servers/OSHttpRequestPump.cs b/OpenSim/Framework/Servers/OSHttpRequestPump.cs index b76fadc..4218be5 100644 --- a/OpenSim/Framework/Servers/OSHttpRequestPump.cs +++ b/OpenSim/Framework/Servers/OSHttpRequestPump.cs @@ -165,11 +165,14 @@ namespace OpenSim.Framework.Servers if (null != endPointsRegex) { // TODO: following code requires code changes to - // HttpServer.HttpRequest + // HttpServer.HttpRequest to become functional - // IPEndPoint remote = HttpServer.HttpRequest.RemoteIPEndPoint; - // Match epm = endPointsRegex.Match(remote.ToString()); - // if (!epm.Success) continue; + IPEndPoint remote = req.RemoteIPEndPoint; + if (null != remote) + { + Match epm = endPointsRegex.Match(remote.ToString()); + if (!epm.Success) continue; + } } // whitelist ok, now check path -- cgit v1.1