fix(webhooks): actually correctly parse urls for DNS resolution
This commit is contained in:
parent
a81ffc3399
commit
00b7f76a5b
@ -76,13 +76,15 @@ namespace PluralKit.Core
|
|||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task<bool> ValidateUri(string uri)
|
public static async Task<bool> ValidateUri(string url)
|
||||||
{
|
{
|
||||||
|
var uri = new Uri(url);
|
||||||
|
|
||||||
IPHostEntry host = null;
|
IPHostEntry host = null;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
host = await Dns.GetHostEntryAsync(uri);
|
host = await Dns.GetHostEntryAsync(uri.DnsSafeHost);
|
||||||
}
|
}
|
||||||
catch (Exception) { }
|
catch (Exception) { }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user