#31784: When sending emails with a name over 75 characters long new lines are
introduced which is incompatible with the latest minor versions of python
3.6/7/8
---------------------------------------+------------------------
               Reporter:  Nick Orr     |          Owner:  nobody
                   Type:  Bug          |         Status:  new
              Component:  Core (Mail)  |        Version:  2.2
               Severity:  Normal       |       Keywords:
           Triage Stage:  Unreviewed   |      Has patch:  0
    Needs documentation:  0            |    Needs tests:  0
Patch needs improvement:  0            |  Easy pickings:  0
                  UI/UX:  0            |
---------------------------------------+------------------------
 In the process of sending an email the addresses is sanatized:

 django/core/mail/message.py:98 => def sanitize_address(addr, encoding)

 The Name portion is encoded via the Header class
 email.header.Header.encode which will introduce newlines at 75 characters.

 Unfortunately the most recent python security update no longer allows that
 to happen. So when  Address(nm, addr_spec=addr) is called in
 sanitize_address a new error is raised from the Python Standard library.

 The update to python can be found here:
 
https://github.com/python/cpython/commit/f91a0b6df14d6c5133fe3d5889fad7d84fc0c046
 #diff-3c5a266cd05e7d4173bf110ee93edd16

 Essentially Django can no longer send emails with names longer then 75
 chracters.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31784>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/052.4b0ca68fbf42ce182639d0fba0a3352e%40djangoproject.com.

Reply via email to