diff --git a/CHANGELOG.md b/CHANGELOG.md index 02c2265c9..8c1adadcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr ### Changed - Improve runtime handling of non-persisted purchases and subscriptions. - Improve validation of count multiple matchmaker parameter. +- Stricter validation of devconsole user email inputs. ## [3.12.0] - 2022-05-22 ### Added diff --git a/server/console_user.go b/server/console_user.go index 4bce04e55..e16cef234 100644 --- a/server/console_user.go +++ b/server/console_user.go @@ -45,7 +45,7 @@ func (s *ConsoleServer) AddUser(ctx context.Context, in *console.AddUserRequest) if in.Email == "" { return nil, status.Error(codes.InvalidArgument, "Email is required") - } else if len(in.Email) < 3 || len(in.Email) > 254 || !emailRegex.MatchString(in.Email) { + } else if len(in.Email) < 3 || len(in.Email) > 254 || !emailRegex.MatchString(in.Email) || invalidCharsRegex.MatchString(in.Email) { return nil, status.Error(codes.InvalidArgument, "Not a valid email address") }