From fc940ab09a31b27c4069e7000dbf4a75ce58c962 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 23 Dec 2014 20:38:20 +0000 Subject: If a moap entry has EnableWhiteList but WhiteList == null, then properly block the request instead of throwing an exception. Normally, WhiteList is an empty list but from Mantis 7389 it looks like it might sometimes be possible for it to be null (haven't seen this up till now) It looks like failing with an exception instead of properly replying to the request (which comes in via a cap) might be enough, surprisingly, to freeze a viewer until timeout. Part of http://opensimulator.org/mantis/view.php?id=7389 but probably unrelated to the actual issue of that mantis. --- OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index 601e81e..46b0470 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs @@ -595,6 +595,9 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap /// true if the url matches an entry on the whitelist, false otherwise protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist) { + if (whitelist == null) + return false; + Uri url = new Uri(rawUrl); foreach (string origWlUrl in whitelist) -- cgit v1.1