mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +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:
@@ -2,7 +2,6 @@ package hugolib
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@@ -1282,7 +1281,7 @@ func readFileFromFs(t testing.TB, fs afero.Fs, filename string) string {
|
||||
root = helpers.FilePathSeparator + root
|
||||
}
|
||||
|
||||
helpers.PrintFs(fs, root, os.Stdout)
|
||||
//helpers.PrintFs(fs, root, os.Stdout)
|
||||
t.Fatalf("Failed to read file: %s", err)
|
||||
}
|
||||
return string(b)
|
||||
|
Reference in New Issue
Block a user