summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorYarden Shoham <hrsi88@gmail.com>2023-01-22 19:37:26 +0200
committerGitHub <noreply@github.com>2023-01-22 11:37:26 -0600
commit6068978c4234c55fff8666e262b72339eb21f031 (patch)
tree63b7c98542671cd61b34db25c39b605dfb3cfc5e /routers
parentc320caed9700ac5e6a203a4a0dd3dbddb274c36c (diff)
downloadgitea-6068978c4234c55fff8666e262b72339eb21f031.tar.gz
gitea-6068978c4234c55fff8666e262b72339eb21f031.zip
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>
Diffstat (limited to 'routers')
-rw-r--r--routers/private/mail.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/private/mail.go b/routers/private/mail.go
index e858992aee..d55e33fd23 100644
--- a/routers/private/mail.go
+++ b/routers/private/mail.go
@@ -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)
}