diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-06-08 16:29:04 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-06-12 13:47:38 +0200 |
commit | f210188da3ce901d7bdef095c2021f8365bf11e4 (patch) | |
tree | 7ad37a4f91c2486e6adc99b285552dc1f42a4774 /config/security | |
parent | c782ebd89c4e40f9c7ce363359efc64e8355ad17 (diff) |
Upgrade to v2 of the Dart Sass Embedded Protocol
Fixes #11059
Diffstat (limited to 'config/security')
-rw-r--r-- | config/security/securityConfig.go | 6 | ||||
-rw-r--r-- | config/security/securityConfig_test.go | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/config/security/securityConfig.go b/config/security/securityConfig.go index f7d2beac8..8bd12af4b 100644 --- a/config/security/securityConfig.go +++ b/config/security/securityConfig.go @@ -35,9 +35,9 @@ const securityConfigKey = "security" var DefaultConfig = Config{ Exec: Exec{ Allow: NewWhitelist( - "^dart-sass-embedded$", - "^go$", // for Go Modules - "^npx$", // used by all Node tools (Babel, PostCSS). + "^(dart-)?sass(-embedded)?$", // sass, dart-sass, dart-sass-embedded. + "^go$", // for Go Modules + "^npx$", // used by all Node tools (Babel, PostCSS). "^postcss$", ), // These have been tested to work with Hugo's external programs diff --git a/config/security/securityConfig_test.go b/config/security/securityConfig_test.go index edc1737e3..3bfd59ce3 100644 --- a/config/security/securityConfig_test.go +++ b/config/security/securityConfig_test.go @@ -140,7 +140,7 @@ func TestToTOML(t *testing.T) { got := DefaultConfig.ToTOML() c.Assert(got, qt.Equals, - "[security]\n enableInlineShortcodes = false\n\n [security.exec]\n allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$']\n osEnv = ['(?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM|GO\\w+)$']\n\n [security.funcs]\n getenv = ['^HUGO_', '^CI$']\n\n [security.http]\n methods = ['(?i)GET|POST']\n urls = ['.*']", + "[security]\n enableInlineShortcodes = false\n\n [security.exec]\n allow = ['^(dart-)?sass(-embedded)?$', '^go$', '^npx$', '^postcss$']\n osEnv = ['(?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM|GO\\w+)$']\n\n [security.funcs]\n getenv = ['^HUGO_', '^CI$']\n\n [security.http]\n methods = ['(?i)GET|POST']\n urls = ['.*']", ) } |