Skip to content

Commit

Permalink
Stricter validation of devconsole user email inputs.
Browse files Browse the repository at this point in the history
  • Loading branch information
zyro committed Jul 4, 2022
1 parent f2a8463 commit 2192e99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion server/console_user.go
Expand Up @@ -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")
}

Expand Down

0 comments on commit 2192e99

Please sign in to comment.