mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
#1575 - Fix invalid URL handling
This commit is contained in:
@@ -137,12 +137,8 @@ namespace Jackett.Indexers
|
||||
if (!configData.SiteLink.Value.EndsWith("/", StringComparison.Ordinal))
|
||||
configData.SiteLink.Value += "/";
|
||||
|
||||
var match = Regex.Match(configData.SiteLink.Value, "^https?:\\/\\/[\\w\\-\\/\\.]+$");
|
||||
if (!match.Success)
|
||||
{
|
||||
throw new Exception(string.Format("\"{0}\" is not a valid URL.", configData.SiteLink.Value));
|
||||
}
|
||||
|
||||
// check whether the site link is well-formatted
|
||||
var siteUri = new Uri(configData.SiteLink.Value);
|
||||
SiteLink = configData.SiteLink.Value;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user