MM-58255 Ensure remote users do not get valid email addresses (#27421)
* remote users don't get valid email addresses; remote users cannot have access tokens * block notification emails for remote users --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
@@ -346,7 +346,7 @@ func (u *User) IsValid() *AppError {
|
||||
}
|
||||
}
|
||||
|
||||
if len(u.Email) > UserEmailMaxLength || u.Email == "" || !IsValidEmail(u.Email) {
|
||||
if len(u.Email) > UserEmailMaxLength || u.Email == "" || (!IsValidEmail(u.Email) && !u.IsRemote()) {
|
||||
return InvalidUserError("email", u.Id, u.Email)
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user