summaryrefslogtreecommitdiffstats
path: root/routers/private
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2023-01-22 15:23:52 +0100
committerGitHub <noreply@github.com>2023-01-22 08:23:52 -0600
commit21dd4a252a98fee4e8b4304d63685c4fae7cc077 (patch)
tree20e81cfe513753adc19c5a1902289d6925cb3aa2 /routers/private
parent6737e1c5d589e9521e4e07824a2fc9280270e19f (diff)
downloadgitea-21dd4a252a98fee4e8b4304d63685c4fae7cc077.tar.gz
gitea-21dd4a252a98fee4e8b4304d63685c4fae7cc077.zip
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>
Diffstat (limited to 'routers/private')
-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 622a01dd8f..e5e162c880 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)
}