[issue43554] email: encoded headers lose their quoting when refolded

2021-03-19 Thread hai shi
Change by hai shi : -- nosy: +barry, maxking, r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43554] email: encoded headers lose their quoting when refolded

2021-03-19 Thread Emil Styrke
New submission from Emil Styrke : When a header with an encoded (QP or Base64) display_name is refolded, it may lose (some of) its encoding. If it then contains illegal "atext" tokens, an invalid header will result. For example, `From: =?utf-8?Q?a=2C=20123456789012345678901234567890123456?=