aboutsummaryrefslogtreecommitdiffhomepage
path: root/helpers/path_test.go
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 /helpers/path_test.go
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 'helpers/path_test.go')
-rw-r--r--helpers/path_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/helpers/path_test.go b/helpers/path_test.go
index e58a045c1..d27d2e9b9 100644
--- a/helpers/path_test.go
+++ b/helpers/path_test.go
@@ -60,7 +60,7 @@ func TestMakePath(t *testing.T) {
v.Set("removePathAccents", test.removeAccents)
l := langs.NewDefaultLanguage(v)
- p, err := NewPathSpec(hugofs.NewMem(v), l)
+ p, err := NewPathSpec(hugofs.NewMem(v), l, nil)
require.NoError(t, err)
output := p.MakePath(test.input)
@@ -73,7 +73,7 @@ func TestMakePath(t *testing.T) {
func TestMakePathSanitized(t *testing.T) {
v := newTestCfg()
- p, _ := NewPathSpec(hugofs.NewMem(v), v)
+ p, _ := NewPathSpec(hugofs.NewMem(v), v, nil)
tests := []struct {
input string
@@ -101,7 +101,7 @@ func TestMakePathSanitizedDisablePathToLower(t *testing.T) {
v.Set("disablePathToLower", true)
l := langs.NewDefaultLanguage(v)
- p, _ := NewPathSpec(hugofs.NewMem(v), l)
+ p, _ := NewPathSpec(hugofs.NewMem(v), l, nil)
tests := []struct {
input string