From af05fbea27df62c96b411a941cf5bb612f256e9d Mon Sep 17 00:00:00 2001 From: Julio Capote Date: Fri, 6 Jan 2023 21:43:11 -0500 Subject: sanitize/strip any incoming html --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index 62d971b..261c247 100644 --- a/main.go +++ b/main.go @@ -10,6 +10,7 @@ import ( "git.capotej.com/capotej/communique/registry" "github.com/BurntSushi/toml" "github.com/dgraph-io/badger/v3" + "github.com/microcosm-cc/bluemonday" "go.uber.org/zap" "go.uber.org/zap/zapio" ) @@ -61,7 +62,8 @@ func main() { var mainWg sync.WaitGroup // // Internal CGI Servers - cgiServers := cgi.NewServers(log, persister, cfg) + policy := bluemonday.StrictPolicy() + cgiServers := cgi.NewServers(log, persister, cfg, policy) mainWg.Add(1) go cgiServers.Start() -- cgit v1.2.3