1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-19 21:46:50 -04:00

New: Prevent Remote Path Mapping local folder being set to System folder or '/'

(cherry picked from commit 0f904e091702a2ac53771ee3aeb5aafe62688035)
This commit is contained in:
Mark McDowall
2025-03-24 20:14:55 -07:00
committed by Bogdan
parent 29ca18d3f3
commit b7be80744c
@@ -31,7 +31,10 @@ namespace Radarr.Api.V3.RemotePathMappings
.Cascade(CascadeMode.Stop)
.IsValidPath()
.SetValidator(mappedNetworkDriveValidator)
.SetValidator(pathExistsValidator);
.SetValidator(pathExistsValidator)
.SetValidator(new SystemFolderValidator())
.NotEqual("/")
.WithMessage("Cannot be set to '/'");
}
protected override RemotePathMappingResource GetResourceById(int id)