mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
Block symlink dir traversal for /static
This is in line with how it behaved before, but it was lifted a little for the project mount for Hugo Modules, but that could create hard-to-detect loops.
This commit is contained in:
@@ -459,9 +459,5 @@ func (f *rootMappingFile) Readdirnames(count int) ([]string, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
dirss := make([]string, len(dirs))
|
||||
for i, d := range dirs {
|
||||
dirss[i] = d.Name()
|
||||
}
|
||||
return dirss, nil
|
||||
return fileInfosToNames(dirs), nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user