mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-06 05:47:53 +00:00
Explicitly error if the URI schema is wrong
This commit is contained in:
parent
666b21a08f
commit
f03bab303c
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue