diff options
author | Julio Capote <jcapote@gmail.com> | 2023-01-07 02:43:11 +0000 |
---|---|---|
committer | Julio Capote <jcapote@gmail.com> | 2023-01-07 02:43:11 +0000 |
commit | af05fbea27df62c96b411a941cf5bb612f256e9d (patch) | |
tree | 2e0adf39efc67b3531e845586604436cedb8c8d0 /main.go | |
parent | 3b92291afc24598faf82a5069326d35f2899b072 (diff) | |
download | communique-af05fbea27df62c96b411a941cf5bb612f256e9d.tar.gz |
sanitize/strip any incoming html
Diffstat (limited to '')
-rw-r--r-- | main.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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() |