mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
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.
This commit is contained in:
@@ -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>
|
||||
protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist)
|
||||
{
|
||||
if (whitelist == null)
|
||||
return false;
|
||||
|
||||
Uri url = new Uri(rawUrl);
|
||||
|
||||
foreach (string origWlUrl in whitelist)
|
||||
|
||||
Reference in New Issue
Block a user