#37152: EmailMessage should block `bcc` in `extra_headers` and docs should not
suggest `bcc` is a header
--------------------------------------+------------------------------------
Reporter: Natalia Bidart | Owner: hi
Type: Cleanup/optimization | Status: assigned
Component: Core (Mail) | Version: 6.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by hi):
Replying to [comment:5 Mike Edmunds]:
> After some additional thought, I think the right way to handle this is
for `EmailMessage.message()` to raise an error if it finds `"bcc"` in the
`headers`. It's almost certainly a mistake on the caller's part, and we
should be pointing them toward the `bcc` recipient arg instead. There's
also a ''slight'' chance (per my earlier comment) it's deliberate. But
either way, Django should not ''silently'' filter `"bcc"` out of the
headers.
>
> I would also probably mention this in the release notes as a
potentially-breaking change without deprecation. (Any "working" code that
depends on this is using undocumented, non-standard behavior for Bcc
headers, so I think a breaking change is OK.)
Thanks, I updated the patch.
--
Ticket URL: <https://code.djangoproject.com/ticket/37152#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019eb7bd02dd-0b4441dc-7a64-4a8d-b00b-90f27ba17e22-000000%40eu-central-1.amazonses.com.