diff options
| author | Claude Paroz <claude@2xlibre.net> | 2017-04-01 15:08:21 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2017-04-01 16:19:03 +0200 |
| commit | 9a9e22832166594e3561fa1911dd255a2fb09b2b (patch) | |
| tree | 85b3c28200c8a445be6ba71a3910922f8b969d50 /django | |
| parent | bde86ce9ae17ee52aa5be9b74b64422f5219530d (diff) | |
Fixed #27848 -- Prevented crash when attaching a .eml file to a message
Thanks Sébastien Ramage for the report.
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/mail/message.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/mail/message.py b/django/core/mail/message.py index 7ab5414482..f12531af4c 100644 --- a/django/core/mail/message.py +++ b/django/core/mail/message.py @@ -381,7 +381,7 @@ class EmailMessage: elif not isinstance(content, Message): # For compatibility with existing code, parse the message # into an email.Message object if it is not one already. - content = message_from_string(content) + content = message_from_string(force_text(content)) attachment = SafeMIMEMessage(content, subtype) else: |
