MM-60722 - don't allow multiple '@' in email (#28481)
* don't allow quoted strings in email * don't allow multiple '@' in email --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b8e462e198
Коммит
d5ce06e580
@@ -631,6 +631,12 @@ func IsValidEmail(email string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// mail.ParseAddress accepts quoted strings for the address
|
||||
// which can lead to sending to the wrong email address
|
||||
// check for multiple '@' symbols and invalidate
|
||||
if strings.Count(email, "@") > 1 {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user