[WIP] bpo-37461: Fix email.parser.Parse hang#14551
[WIP] bpo-37461: Fix email.parser.Parse hang#14551n0npax wants to merge 3 commits intopython:masterfrom
Conversation
|
I've got 2 broken tests and I would appreciate some guidance. |
|
Test case failures usually mean there is a regression where some behavior that was guaranteed previously is now being changed and there should be a good reason to change the tests. Sorry, email is not my expertise and maybe @maxking could help. |
|
This is a slightly different PoC, and this still hangs after applying the PR from email.parser import BytesParser, Parser
from email.policy import default
payload = "\x43\x6f\x6e\x74\x65\x6e\x74\x2d\x54\x79\x70\x65\x3a\x78\x3b\x61\x72\x1b\x2a\x3d\x22\x73\x4f\x27\x23\x61\xff\xff\x27\x5c\x22\x3d\x72\x2d\x54\x79\x8e\xc4\x9e\x8d\xe4\xd5\xc2\x83\x7c\x7c\x7c"
Parser(policy=default).parsestr(payload) |
|
Thanks @n0npax for this patch! +1 on what @guidovranken says, I was going to comment but you beat me to it. I probably won't be able help too much for next 15 days, since I am travelling, but this PR doesn't fix the real problem. I was able to reproduce the problem with: Note the last Please make sure we don't delete any tests without proper reasoning about why we need to delete them :) |
|
I've got no idea how to solve this in a proper way. Closing PR. |
|
Sorry for fuss guys. Thanks for suggestions. |
https://bugs.python.org/issue37461
https://bugs.python.org/issue37461