Remove automatic repository subdirectories
This commit is contained in:
@@ -166,12 +166,6 @@ func ValidateRepository(r Repository) error {
|
||||
if r.Mount.Remote == "" || !filepath.IsAbs(r.Mount.MountPoint) {
|
||||
return errors.New("managed mount requires remote and absolute mountPoint")
|
||||
}
|
||||
location := filepath.Clean(r.Location)
|
||||
mountPoint := filepath.Clean(r.Mount.MountPoint)
|
||||
relative, err := filepath.Rel(mountPoint, location)
|
||||
if err != nil || relative == ".." || strings.HasPrefix(relative, ".."+string(filepath.Separator)) {
|
||||
return errors.New("managed repository location must be inside mountPoint")
|
||||
}
|
||||
}
|
||||
if r.Type == RepositorySFTP && r.CredentialRef != "" {
|
||||
knownHosts := r.Options["knownHostsPath"]
|
||||
|
||||
Reference in New Issue
Block a user