aboutsummaryrefslogtreecommitdiffhomepage
path: root/cache
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2019-07-25 00:12:40 +0200
committerBjørn Erik Pedersen <[email protected]>2019-07-25 11:27:25 +0200
commite5f229974166402f51e4ee0695ffb4d1e09fa174 (patch)
tree44dc7adc4fd02cb563583afaff6ddaa781821e2f /cache
parent87a07282a2f01779e098cde0aaee1bae34dc32e6 (diff)
downloadhugo-e5f229974166402f51e4ee0695ffb4d1e09fa174.tar.gz
hugo-e5f229974166402f51e4ee0695ffb4d1e09fa174.zip
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.
Diffstat (limited to 'cache')
-rw-r--r--cache/filecache/filecache_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cache/filecache/filecache_test.go b/cache/filecache/filecache_test.go
index a03c3116a..78becd43b 100644
--- a/cache/filecache/filecache_test.go
+++ b/cache/filecache/filecache_test.go
@@ -292,7 +292,7 @@ func newPathsSpec(t *testing.T, fs afero.Fs, configStr string) *helpers.PathSpec
cfg, err := config.FromConfigString(configStr, "toml")
assert.NoError(err)
initConfig(fs, cfg)
- p, err := helpers.NewPathSpec(hugofs.NewFrom(fs, cfg), cfg)
+ p, err := helpers.NewPathSpec(hugofs.NewFrom(fs, cfg), cfg, nil)
assert.NoError(err)
return p