From 610a2626a5e60cf5c3511ecf4d4187e9da71d336 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 15 Jul 2010 21:14:55 +0100 Subject: Implement * end wildcard for whitelist urls --- OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index 4bbac6e..c24e6d5 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs @@ -460,6 +460,10 @@ namespace OpenSim.Region.CoreModules.Media.Moap { string wlUrl = rawWlUrl; + // Deal with a line-ending wildcard + if (wlUrl.EndsWith("*")) + wlUrl = wlUrl.Remove(wlUrl.Length - 1); + if (!wlUrl.StartsWith("http://")) wlUrl = "http://" + wlUrl; @@ -467,7 +471,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap if (url.StartsWith(wlUrl)) { - m_log.DebugFormat("[MOAP]: Whitelist url {0} matches requested url {1}", wlUrl, url); + m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", wlUrl, url); return true; } } -- cgit v1.1