#26572: AdminEmailHandler fails to honor subject length limit
-----------------------------+------------------------------------
     Reporter:  pdewacht     |                    Owner:  nobody
         Type:  Bug          |                   Status:  new
    Component:  Core (Mail)  |                  Version:  1.9
     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
-----------------------------+------------------------------------
Changes (by claudep):

 * needs_better_patch:  0 => 1


Comment:

 After some more consideration, I discovered that headers are not limited
 in total length by the spec, only individual lines are. Read
 https://tools.ietf.org/html/rfc5322#section-2.1.3: `An unfolded header
 field has no length restriction and therefore may be indeterminately
 long.`.
 Then Python is automatically folding headers when sending messages, by
 default to 78 characters. So now I think that the subject line truncation
 is simply wrong. Of course, it's not nice to receive very long headers,
 but we have no reason to truncate subject or any other header.
 We might even question the refusal to accept newlines in headers, but that
 would be the subject of a separate ticket.

--
Ticket URL: <https://code.djangoproject.com/ticket/26572#comment:3>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.8314f12cfd58e73bd2333127e032416d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to