Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
The following code breaks with an attribute error:
importemail.parserimportemail.policya='t'*46h=f'''\To: =?utf-8?B?dGVzdC50ZXN0LnRlc3QudGVzdEB0ZXN0LmNvbeKAiw=?= <test@test.com>,\r\n\t"tttest&{a}.t.t.t.t.t.t.t@yahoo.ES" <test@test.tj>,\r\n\t"tttest&{a}.t.t.t.t.t.t@yahoo.ES" <info@test.tj>'''m=email.parser.HeaderParser(policy=email.policy.default).parsestr(h)m.as_string()
The problem was introduced on#100885, settingListSeparator.as_ew_allowed = False toTrue fixes the problem. Changing any character in the header in the example above also fixes the problem (which makes it harder to understand exactly why it's broken).
CPython versions tested on:
3.12
Operating systems tested on:
macOS