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;
|
||||
}
|
||||
|
||||
public static async Task<bool> ValidateUri(string uri)
|
||||
public static async Task<bool> ValidateUri(string url)
|
||||
{
|
||||
var uri = new Uri(url);
|
||||
|
||||
IPHostEntry host = null;
|
||||
|
||||
try
|
||||
{
|
||||
host = await Dns.GetHostEntryAsync(uri);
|
||||
host = await Dns.GetHostEntryAsync(uri.DnsSafeHost);
|
||||
}
|
||||
catch (Exception) { }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user