-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Backport #22566 Change the mailer interface to prevent the leaking of possible hidden email addresses when sending to multiple recipients. Co-authored-by: KN4CK3R <[email protected]> Co-authored-by: Gusted <[email protected]>
- Loading branch information
1 parent
c320cae
commit 6068978
Showing
7 changed files
with
23 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,17 +22,17 @@ func TestGenerateMessageID(t *testing.T) { | |
setting.Domain = "localhost" | ||
|
||
date := time.Date(2000, 1, 2, 3, 4, 5, 6, time.UTC) | ||
m := NewMessageFrom(nil, "display-name", "from-address", "subject", "body") | ||
m := NewMessageFrom("", "display-name", "from-address", "subject", "body") | ||
m.Date = date | ||
gm := m.ToMessage() | ||
assert.Equal(t, "<autogen-946782245000-41e8fc54a8ad3a3f@localhost>", gm.GetHeader("Message-ID")[0]) | ||
|
||
m = NewMessageFrom([]string{"[email protected]"}, "display-name", "from-address", "subject", "body") | ||
m = NewMessageFrom("[email protected]", "display-name", "from-address", "subject", "body") | ||
m.Date = date | ||
gm = m.ToMessage() | ||
assert.Equal(t, "<autogen-946782245000-cc88ce3cfe9bd04f@localhost>", gm.GetHeader("Message-ID")[0]) | ||
|
||
m = NewMessageFrom([]string{"[email protected]"}, "display-name", "from-address", "subject", "body") | ||
m = NewMessageFrom("[email protected]", "display-name", "from-address", "subject", "body") | ||
m.SetHeader("Message-ID", "<[email protected]>") | ||
gm = m.ToMessage() | ||
assert.Equal(t, "<[email protected]>", gm.GetHeader("Message-ID")[0]) | ||
|