Explicitly error if the URI schema is wrong

This commit is contained in:
Ske 2020-07-05 13:19:43 +02:00
parent 666b21a08f
commit f03bab303c

View File

@ -26,7 +26,8 @@ namespace PluralKit.Bot {
try
{
uri = new Uri(url);
if (!uri.IsAbsoluteUri) throw Errors.InvalidUrl(url);
if (!uri.IsAbsoluteUri || (uri.Scheme != "http" && uri.Scheme != "https"))
throw Errors.InvalidUrl(url);
}
catch (UriFormatException)
{