[issue36041] email: folding of quoted string in display_name violates RFC

2019-11-20 Thread Ronald Evers
Change by Ronald Evers : -- nosy: +ronaldevers ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue36041] email: folding of quoted string in display_name violates RFC

2019-02-26 Thread Aaryn Tonita
Aaryn Tonita added the comment: Although I am not personally interested in backporting a fix for this issue, anyone that experiences this issue in python 3.5 can execute the following monkey patch to solve the issue: def _fix_issue_36041_3_5(): from email._header_value_parser import Quot

[issue36041] email: folding of quoted string in display_name violates RFC

2019-02-26 Thread Aaryn Tonita
Aaryn Tonita added the comment: Sorry about the delay. I opened pull request https://github.com/python/cpython/pull/12054 for this. Let me know if you need anything else. -- ___ Python tracker

[issue36041] email: folding of quoted string in display_name violates RFC

2019-02-26 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +12080 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue36041] email: folding of quoted string in display_name violates RFC

2019-02-20 Thread Aaryn Tonita
Aaryn Tonita added the comment: Sure thing, I'll try to produce something tomorrow. -- ___ Python tracker ___ ___ Python-bugs-list

[issue36041] email: folding of quoted string in display_name violates RFC

2019-02-20 Thread R. David Murray
R. David Murray added the comment: I'm afraid I don't have time to parse through the file you uploaded. Can you produce a pull request or a diff showing your fix? And ideally some added tests :) But whatever you can do is great, if you don't have time maybe someone else will pick it up (I

[issue36041] email: folding of quoted string in display_name violates RFC

2019-02-20 Thread Aaryn Tonita
Aaryn Tonita added the comment: Hi David, the problem is in email._header_value_parser._refold_parse_tree. Specifically, when the parsetree renders too long, it recursively gets newparts = list(part) (the children). When it does this to a BareQuotedString node, the child nodes are unquoted a

[issue36041] email: folding of quoted string in display_name violates RFC

2019-02-19 Thread R. David Murray
R. David Murray added the comment: Since Address itself renders it correctly (str(address)), the problem is going to take a bit of digging to find. I'm guessing the quoted_string atom is getting transformed incorrectly into something else at some point during the folding. -- _

[issue36041] email: folding of quoted string in display_name violates RFC

2019-02-19 Thread Aaryn Tonita
New submission from Aaryn Tonita : When using a policy for an EmailMessage that triggers folding (during serialization) of a fairly long display_name in an address field, the folding process removes the quotes from the display name breaking the semantics of the field. In particular, for a Fr