1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #13259 -- Ensure that multiple calls to message() don't corrupt any extra message headers. Thanks to canburak for the report, and Andi Albrecht for the fix.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee
2010-04-01 15:16:26 +00:00
parent 271bcda04a
commit db5be42c12
2 changed files with 13 additions and 1 deletions

View File

@@ -101,6 +101,16 @@ BadHeaderError: Header values can't contain newlines (got u'Subject\nInjection T
>>> message['From']
'from@example.com'
# Regression for #13259 - Make sure that headers are not changed
# when calling EmailMessage.message()
>>> email = EmailMessage('Subject', 'Content', 'bounce@example.com', ['to@example.com'], headers={'From': 'from@example.com'})
>>> message = email.message()
>>> message['From']
'from@example.com'
>>> message = email.message()
>>> message['From']
'from@example.com'
# Regression for #11144 - When a to/from/cc header contains unicode,
# make sure the email addresses are parsed correctly (especially
# with regards to commas)