mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-01 07:55:22 +02:00
New: Restrict ports that Sonarr will allow for its webserver
This commit is contained in:
@@ -30,7 +30,21 @@ namespace NzbDrone.Core.Validation
|
||||
|
||||
public static IRuleBuilderOptions<T, int> ValidPort<T>(this IRuleBuilder<T, int> ruleBuilder)
|
||||
{
|
||||
return ruleBuilder.SetValidator(new InclusiveBetweenValidator(1, 65535));
|
||||
return ruleBuilder.SetValidator(new InclusiveBetweenValidator(1, 65535))
|
||||
.Must(x =>
|
||||
{
|
||||
if (x <= 1024)
|
||||
{
|
||||
if (x == 80 || x == 443)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
public static IRuleBuilderOptions<T, Language> ValidLanguage<T>(this IRuleBuilder<T, Language> ruleBuilder)
|
||||
|
Reference in New Issue
Block a user