mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 07:53:19 +01:00
Correct handling of e-mail attachments where the name is encoded in rfc2231. Thanks to Sergey Kirillov for the patch, which closes Google Code issue #154 and Github issue #11.
This commit is contained in:
parent
8f15febe23
commit
2d7d3c489d
@ -18,7 +18,7 @@ import re
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
from email.header import decode_header
|
||||
from email.Utils import parseaddr
|
||||
from email.Utils import parseaddr, collapse_rfc2231_value
|
||||
from optparse import make_option
|
||||
|
||||
from django.core.files.base import ContentFile
|
||||
@ -177,6 +177,8 @@ def ticket_from_message(message, queue, quiet):
|
||||
continue
|
||||
|
||||
name = part.get_param("name")
|
||||
if name:
|
||||
name = collapse_rfc2231_value(name)
|
||||
|
||||
if part.get_content_maintype() == 'text' and name == None:
|
||||
if part.get_content_subtype() == 'plain':
|
||||
|
Loading…
Reference in New Issue
Block a user