Message347953
>>> bytes([0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x78, 0x3b, 0x61, 0x72, 0x1b, 0x2a, 0x3d, 0x22, 0x73, 0x4f, 0x27, 0x23, 0x61, 0xff, 0xff, 0x27, 0x5c, 0x22])
b'Content-Type:x;ar\x1b*="sO\'#a\xff\xff\'\\"'
The following loop of Lib/email/_header_value_parser.py does never stop:
def get_parameter(value):
""" attribute [section] ["*"] [CFWS] "=" value
The CFWS is implied by the RFC but not made explicit in the BNF. This
simplified form of the BNF from the RFC is made to conform with the RFC BNF
through some extra checks. We do it this way because it makes both error
recovery and working with the resulting parse tree easier.
"""
...
if remainder is not None:
...
while value:
...
Attached reproducer.py is code from initial msg346953.
reproducer2.py simplify the input and calls directly get_parameter(). Simplified input string:
r*="'a'\" |
|
Date |
User |
Action |
Args |
2019-07-15 09:36:10 | vstinner | set | recipients:
+ vstinner, barry, alex, r.david.murray, Nam.Nguyen, maxking, Guido, xtreak, Marcin Niemira |
2019-07-15 09:36:10 | vstinner | set | messageid: <1563183370.5.0.0401573365199.issue37461@roundup.psfhosted.org> |
2019-07-15 09:36:10 | vstinner | link | issue37461 messages |
2019-07-15 09:36:10 | vstinner | create | |
|