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:
KN4CK3R 2023-01-22 15:23:52 +01:00 committed by GitHub
parent 6737e1c5d5
commit 21dd4a252a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 23 additions and 20 deletions

View file

@ -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)
}