mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-26 13:40:38 +03: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:
parent
87a07282a2
commit
e5f2299741
24 changed files with 320 additions and 130 deletions
|
@ -73,7 +73,7 @@ func newTestPathSpecFor(cfg config.Provider) *helpers.PathSpec {
|
|||
}
|
||||
cfg.Set("allModules", modules.Modules{mod})
|
||||
fs := hugofs.NewMem(cfg)
|
||||
s, err := helpers.NewPathSpec(fs, cfg)
|
||||
s, err := helpers.NewPathSpec(fs, cfg, nil)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue