config/security: Add O\w+ (e.g. GOROOT) to the default allowed list

Fixes #10429
This commit is contained in:
Bjørn Erik Pedersen
2023-01-17 10:52:51 +01:00
parent 21af5b359f
commit c6b3887696
2 changed files with 6 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ var DefaultConfig = Config{
),
// These have been tested to work with Hugo's external programs
// on Windows, Linux and MacOS.
OsEnv: NewWhitelist("(?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM)$"),
OsEnv: NewWhitelist(`(?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM|GO\w+)$`),
},
Funcs: Funcs{
Getenv: NewWhitelist("^HUGO_", "^CI$"),