#29837: Allow email sending with a newline in the subject
-------------------------------+--------------------------------------
     Reporter:  Álex Córcoles  |                    Owner:  nobody
         Type:  New feature    |                   Status:  new
    Component:  Core (Mail)    |                  Version:  2.1
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------
Changes (by Álex Córcoles):

 * status:  closed => new
 * resolution:  invalid =>


Comment:

 Yeah, I traced the code and I was that avoiding sending an email with
 newlines had to do with security.

 However, I think that raising an undocumented exception is not the right
 answer.

 One option would be to document this problem clearly in send_mail's docs.
 I don't think that's going to save many people from possible runtime
 problems, but at least the behavior is documented.

 I would propose that send_mail removes itself the newlines instead of
 pushing that responsibility to each of its callers. I think it's
 consistent with all the ORM methods being able to avoid SQL injection
 instead of raising an undocumented exception if they receive non-escaped
 values.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29837#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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.20daa4bf7c1e9fbb25ebcb7130b4f4d3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to