#31050 closed Cleanup/optimization (wontfix)
EmailMessage doesn't strip empty addresses from recipients in message headers
Reported by: | Konstantin Alekseev | Owned by: | nobody |
---|---|---|---|
Component: | Core (Mail) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Example
email = EmailMessage( 'Subject', 'Content', 'from@example.com', ['to@example.com', ''], cc=['cc@example.com', ''], bcc=['', 'bcc@example.com'], reply_to=['', None], ) msg = email.message() msg['To'] == 'to@example.com, ' msg['Cc'] == ', cc@example.com' msg['Reply-To'] == ', None'
Change History (2)
comment:1 by , 5 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Type: | Bug → Cleanup/optimization |
Version: | 2.2 → master |
comment:2 by , 5 years ago
EmailMessage it's not responsible for sanitizing an input and should not strip any email addresses
EmailAddress.recipients
inconsistent with that statement, it strips empty emails as a result actual email headers are not equal its result.
Note:
See TracTickets
for help on using tickets.
EmailMessage
it's not responsible for sanitizing an input and should not strip any email addresses. You should validate them before passing to theEmailMessage
.