mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Prevent multiple To
recipients (#22566)
Change the mailer interface to prevent leaking of possible hidden email addresses when sending to multiple recipients. Co-authored-by: Gusted <williamzijl7@hotmail.com>
This commit is contained in:
@@ -81,7 +81,7 @@ func SendEmail(ctx *context.PrivateContext) {
|
||||
|
||||
func sendEmail(ctx *context.PrivateContext, subject, message string, to []string) {
|
||||
for _, email := range to {
|
||||
msg := mailer.NewMessage([]string{email}, subject, message)
|
||||
msg := mailer.NewMessage(email, subject, message)
|
||||
mailer.SendAsync(msg)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user