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.mb-throttle-test
parent
7100475b90
commit
fc940ab09a
|
@ -595,6 +595,9 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
|
||||||
/// <returns>true if the url matches an entry on the whitelist, false otherwise</returns>
|
/// <returns>true if the url matches an entry on the whitelist, false otherwise</returns>
|
||||||
protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist)
|
protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist)
|
||||||
{
|
{
|
||||||
|
if (whitelist == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
Uri url = new Uri(rawUrl);
|
Uri url = new Uri(rawUrl);
|
||||||
|
|
||||||
foreach (string origWlUrl in whitelist)
|
foreach (string origWlUrl in whitelist)
|
||||||
|
|
Loading…
Reference in New Issue