1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-22 16:44:26 +00:00
gitea/services/mailer
Gwyneth Morgan 360b3fd17c
Include username in email headers (#28981)
Emails from Gitea comments do not contain the username of the commenter
anywhere, only their display name, so it is not possible to verify who
made a comment from the email itself:

	From: "Alice" <email@gitea>
	X-Gitea-Sender: Alice
	X-Gitea-Recipient: Bob
	X-GitHub-Sender: Alice
	X-GitHub-Recipient: Bob

	This comment looks like it's from @alice.

The X-Gitea/X-GitHub headers also use display names, which is not very
reliable for filtering, and inconsistent with GitHub's behavior:

	X-GitHub-Sender: lunny
	X-GitHub-Recipient: gwymor

This change includes both the display name and username in the From
header, and switches the other headers from display name to username:

	From: "Alice (@fakealice)" <email@gitea>
	X-Gitea-Sender: fakealice
	X-Gitea-Recipient: bob
	X-GitHub-Sender: fakealice
	X-GitHub-Recipient: bob

	This comment looks like it's from @alice.
2024-02-03 00:41:27 +00:00
..
incoming Even more db.DefaultContext refactor (#27352) 2023-10-03 10:30:41 +00:00
token Use minio/sha256-simd for accelerated SHA256 (#23052) 2023-02-22 14:21:46 -05:00
mail_comment.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
mail_issue.go Clean up template locale usage (#27856) 2023-10-31 22:11:48 +08:00
mail_release.go Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
mail_repo.go Clean up template locale usage (#27856) 2023-10-31 22:11:48 +08:00
mail_team_invite.go Clean up template locale usage (#27856) 2023-10-31 22:11:48 +08:00
mail_test.go Include username in email headers (#28981) 2024-02-03 00:41:27 +00:00
mail.go Include username in email headers (#28981) 2024-02-03 00:41:27 +00:00
mailer_test.go Prevent multiple To recipients (#22566) 2023-01-22 08:23:52 -06:00
mailer.go Clean up template locale usage (#27856) 2023-10-31 22:11:48 +08:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
notify.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00