mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-14 01:30:13 +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
|
try
|
||||||
{
|
{
|
||||||
uri = new Uri(url);
|
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)
|
catch (UriFormatException)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue