mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +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:
@@ -66,7 +66,7 @@ func newTestResourceSpecForBaseURL(assert *require.Assertions, baseURL string) *
|
||||
|
||||
fs := hugofs.NewMem(cfg)
|
||||
|
||||
s, err := helpers.NewPathSpec(fs, cfg)
|
||||
s, err := helpers.NewPathSpec(fs, cfg, nil)
|
||||
assert.NoError(err)
|
||||
|
||||
filecaches, err := filecache.NewCaches(s)
|
||||
@@ -104,7 +104,7 @@ func newTestResourceOsFs(assert *require.Assertions) *Spec {
|
||||
fs.Destination = &afero.MemMapFs{}
|
||||
fs.Source = afero.NewBasePathFs(hugofs.Os, workDir)
|
||||
|
||||
s, err := helpers.NewPathSpec(fs, cfg)
|
||||
s, err := helpers.NewPathSpec(fs, cfg, nil)
|
||||
assert.NoError(err)
|
||||
|
||||
filecaches, err := filecache.NewCaches(s)
|
||||
|
Reference in New Issue
Block a user