mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 06:30:33 +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
|
@ -42,7 +42,7 @@ func TestNewPathSpecFromConfig(t *testing.T) {
|
|||
fs := hugofs.NewMem(v)
|
||||
fs.Source.MkdirAll(filepath.FromSlash("thework/thethemes/thetheme"), 0777)
|
||||
|
||||
p, err := NewPathSpec(fs, l)
|
||||
p, err := NewPathSpec(fs, l, nil)
|
||||
|
||||
require.NoError(t, err)
|
||||
require.True(t, p.CanonifyURLs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue