mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-04-23 22:07:07 -04:00
New: Prevent Remote Path Mapping local folder being set to System folder or '/'
Closes #7686
This commit is contained in:
parent
b103005aa2
commit
dbd2b0c4b5
1 changed files with 5 additions and 2 deletions
|
@ -30,8 +30,11 @@ namespace Sonarr.Api.V3.RemotePathMappings
|
|||
SharedValidator.RuleFor(c => c.LocalPath)
|
||||
.Cascade(CascadeMode.Stop)
|
||||
.IsValidPath()
|
||||
.SetValidator(mappedNetworkDriveValidator)
|
||||
.SetValidator(pathExistsValidator);
|
||||
.SetValidator(mappedNetworkDriveValidator)
|
||||
.SetValidator(pathExistsValidator)
|
||||
.SetValidator(new SystemFolderValidator())
|
||||
.NotEqual("/")
|
||||
.WithMessage("Cannot be set to '/'");
|
||||
}
|
||||
|
||||
protected override RemotePathMappingResource GetResourceById(int id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue