mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-20 03:48:47 +00:00
fix(email): accept SMTPUTF8 addresses (#11115)
# Which Problems Are Solved Zitadel only accepted ASCII email addresses, while some users need to enter internationalized addresses. For example `mö[email protected]` # How the Problems Are Solved - Use `net/mail` to validate email addresses, instead of a custom regex. `net/mail` correctly accepts UTF-8 characters. - In the management/v1 API email address validation is removed (only string limits are applied) # Additional Changes - none # Additional Context Closes https://github.com/zitadel/zitadel/issues/9821
This commit is contained in:
@@ -68,6 +68,20 @@ func TestEmailValid(t *testing.T) {
|
||||
},
|
||||
result: true,
|
||||
},
|
||||
{
|
||||
name: "email UTF-8, valid", // https://github.com/zitadel/zitadel/issues/9821
|
||||
args: args{
|
||||
email: &Email{EmailAddress: "abc@sünde.com"},
|
||||
},
|
||||
result: true,
|
||||
},
|
||||
{
|
||||
name: "email with name, invalid",
|
||||
args: args{
|
||||
email: &Email{EmailAddress: "John Doe <[email protected]>"},
|
||||
},
|
||||
result: false,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user