summaryrefslogtreecommitdiffstats
path: root/source/filesystem_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-07-25 00:12:40 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-07-25 11:27:25 +0200
commite5f229974166402f51e4ee0695ffb4d1e09fa174 (patch)
tree44dc7adc4fd02cb563583afaff6ddaa781821e2f /source/filesystem_test.go
parent87a07282a2f01779e098cde0aaee1bae34dc32e6 (diff)
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 'source/filesystem_test.go')
-rw-r--r--source/filesystem_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/filesystem_test.go b/source/filesystem_test.go
index 33007c7e4..fd3ff1952 100644
--- a/source/filesystem_test.go
+++ b/source/filesystem_test.go
@@ -103,7 +103,7 @@ func newTestConfig() *viper.Viper {
func newTestSourceSpec() *SourceSpec {
v := newTestConfig()
fs := hugofs.NewFrom(hugofs.NewBaseFileDecorator(afero.NewMemMapFs()), v)
- ps, err := helpers.NewPathSpec(fs, v)
+ ps, err := helpers.NewPathSpec(fs, v, nil)
if err != nil {
panic(err)
}