aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2023-01-07 02:43:11 +0000
committerJulio Capote <jcapote@gmail.com>2023-01-07 02:43:11 +0000
commitaf05fbea27df62c96b411a941cf5bb612f256e9d (patch)
tree2e0adf39efc67b3531e845586604436cedb8c8d0 /main.go
parent3b92291afc24598faf82a5069326d35f2899b072 (diff)
downloadcommunique-af05fbea27df62c96b411a941cf5bb612f256e9d.tar.gz
sanitize/strip any incoming html
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 3 insertions, 1 deletions
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()