1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-21 08:58:27 +00:00

Prevent multiple To recipients (#22566) (#22569)

Backport #22566

Change the mailer interface to prevent the leaking of possible hidden
email addresses when sending to multiple recipients.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
This commit is contained in:
Yarden Shoham
2023-01-22 19:37:26 +02:00
committed by GitHub
parent c320caed97
commit 6068978c42
7 changed files with 23 additions and 20 deletions

View File

@@ -83,9 +83,12 @@ func sendRepoTransferNotifyMailPerLang(lang string, newOwner, doer *user_model.U
return err
}
msg := NewMessage(emails, subject, content.String())
msg.Info = fmt.Sprintf("UID: %d, repository pending transfer notification", newOwner.ID)
for _, to := range emails {
msg := NewMessage(to, subject, content.String())
msg.Info = fmt.Sprintf("UID: %d, repository pending transfer notification", newOwner.ID)
SendAsync(msg)
}
SendAsync(msg)
return nil
}