mirror of
https://github.com/Radarr/Radarr
synced 2026-01-08 08:33:55 +01:00
New: Prevent Remote Path Mapping local folder being set to System folder or '/'
(cherry picked from commit 0f904e091702a2ac53771ee3aeb5aafe62688035)
This commit is contained in:
parent
29ca18d3f3
commit
b7be80744c
1 changed files with 5 additions and 2 deletions
|
|
@ -30,8 +30,11 @@ public RemotePathMappingController(IRemotePathMappingService remotePathMappingSe
|
|||
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…
Reference in a new issue