convert all email addresses to lower case (#14)

This commit is contained in:
Christoph Haas
2021-04-22 20:29:37 +02:00
parent 926733dea4
commit e052f400aa
5 changed files with 58 additions and 10 deletions

View File

@@ -108,6 +108,7 @@ func (provider Provider) GetUserModel(ctx *authentication.AuthContext) (*authent
}
func (provider Provider) InitializeAdmin(email, password string) error {
email = strings.ToLower(email)
if !emailRegex.MatchString(email) {
return errors.New("admin username must be an email address")
}