aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-12-23 20:38:20 +0000
committerJustin Clark-Casey (justincc)2014-12-23 20:38:20 +0000
commitfc940ab09a31b27c4069e7000dbf4a75ce58c962 (patch)
treef299009958858da9db464dcbc84bd03beae0ca15 /OpenSim/Region
parentMake sure we always dispose of disposables inside RestClient.Request() (diff)
downloadopensim-SC-fc940ab09a31b27c4069e7000dbf4a75ce58c962.zip
opensim-SC-fc940ab09a31b27c4069e7000dbf4a75ce58c962.tar.gz
opensim-SC-fc940ab09a31b27c4069e7000dbf4a75ce58c962.tar.bz2
opensim-SC-fc940ab09a31b27c4069e7000dbf4a75ce58c962.tar.xz
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.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs3
1 files changed, 3 insertions, 0 deletions
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
595 /// <returns>true if the url matches an entry on the whitelist, false otherwise</returns> 595 /// <returns>true if the url matches an entry on the whitelist, false otherwise</returns>
596 protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist) 596 protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist)
597 { 597 {
598 if (whitelist == null)
599 return false;
600
598 Uri url = new Uri(rawUrl); 601 Uri url = new Uri(rawUrl);
599 602
600 foreach (string origWlUrl in whitelist) 603 foreach (string origWlUrl in whitelist)