mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
If a DNS resolution fails on an outbound request, simply allow it
This commit is contained in:
@@ -212,7 +212,17 @@ namespace OpenSim.Framework
|
||||
// Check that we are permitted to make calls to this endpoint.
|
||||
bool foundIpv4Address = false;
|
||||
|
||||
IPAddress[] addresses = Dns.GetHostAddresses(url.Host);
|
||||
IPAddress[] addresses = null;
|
||||
|
||||
try
|
||||
{
|
||||
addresses = Dns.GetHostAddresses(url.Host);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// If there is a DNS error, we can't stop the script!
|
||||
return true;
|
||||
}
|
||||
|
||||
foreach (IPAddress addr in addresses)
|
||||
{
|
||||
@@ -253,4 +263,4 @@ namespace OpenSim.Framework
|
||||
return allowed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user