Explicitly error if the URI schema is wrong
This commit is contained in:
parent
666b21a08f
commit
f03bab303c
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user