mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 23:52:50 -05:00
catch errors when trying to resolve DNS (#841)
This commit is contained in:
@ -292,8 +292,15 @@ namespace Bit.Icons.Services
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Resolve host to make sure it is not an internal/private IP address
|
// Resolve host to make sure it is not an internal/private IP address
|
||||||
var hostEntry = Dns.GetHostEntry(uri.Host);
|
try
|
||||||
if (hostEntry?.AddressList.Any(ip => IsInternal(ip)) ?? true)
|
{
|
||||||
|
var hostEntry = Dns.GetHostEntry(uri.Host);
|
||||||
|
if (hostEntry?.AddressList.Any(ip => IsInternal(ip)) ?? true)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user