Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Fix i18n language code validation to include `-`

Kailash Nadh00275df910f7
diff --git a/cmd/handlers.go b/cmd/handlers.go
index 8e1542b8..7e777ba0 100644
--- a/cmd/handlers.go
+++ b/cmd/handlers.go
@@ -33,7 +33,7 @@ type pagination struct {
var (
reUUID = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
- reLangCode = regexp.MustCompile("[^a-zA-Z_0-9]")
+ reLangCode = regexp.MustCompile("[^a-zA-Z_0-9\\-]")
)
// registerHandlers registers HTTP handlers.