mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-12-28 08:54:33 +01:00
handling of blank paths during validation.
This commit is contained in:
@@ -12,6 +12,7 @@ namespace NzbDrone.Api.Validation
|
||||
|
||||
protected override bool IsValid(PropertyValidatorContext context)
|
||||
{
|
||||
if (context.PropertyValue == null) return false;
|
||||
return context.PropertyValue.ToString().IsPathValid();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace NzbDrone.Common
|
||||
|
||||
public static bool IsPathValid(this string path)
|
||||
{
|
||||
if (path.ContainsInvalidPathChars())
|
||||
if (path.ContainsInvalidPathChars() || string.IsNullOrWhiteSpace(path))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user