Remove underscore from allowed email local part characters

Underscore is technically allowed by RFC 5321 but causes issues with
many email systems in practice.
This commit is contained in:
Christoph Haas 2026-03-26 00:48:34 +01:00
parent d562e41528
commit da037e9a79
2 changed files with 1 additions and 2 deletions

View file

@ -7,7 +7,6 @@ import (
)
//go:embed all:embed
//go:embed all:embed/_app
var Files embed.FS
func FrontendFileSystem() http.FileSystem {

View file

@ -286,7 +286,7 @@ func (h *UserHandler) ListAll(c *gin.Context) {
Success(c, users)
}
var emailLocalPartRegex = regexp.MustCompile("^[a-zA-Z0-9!#$%&'*+\\-/=?^_`{|}~-]+$")
var emailLocalPartRegex = regexp.MustCompile("^[a-zA-Z0-9!#$%&'*+\\-/=?^`{|}~-]+$")
func validateEmailLocalPart(email string) error {
parts := strings.Split(email, "@")