Commit 2192e990 authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Stricter validation of devconsole user email inputs.

parent f2a84639
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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")
	}