Message315498
This patch only quotes the Comment attribute, and the rest of the code only quotes attributes if they're of the expected type. Consider Expires:
>>> from http.cookies import SimpleCookie
>>> c = SimpleCookie()
>>> c['name'] = 'value'
>>> c['name']['comment'] = '\n'
>>> c['name']['expires'] = 123
>>> c.output()
'Set-Cookie: name=value; Comment="\\012"; expires=Fri, 20 Apr 2018 02:03:13 GMT'
>>> c['name']['expires'] = '123; path=.example.invalid'
'Set-Cookie: name=value; Comment="\\012"; expires=123; path=.example.invalid'
Here's the offending line:
https://github.com/python/cpython/blob/b87c1c92fc93c5733cd3d8606ab2301ca6ba208f/Lib/http/cookies.py#L415
Why not quote all attribute values? |
|
Date |
User |
Action |
Args |
2018-04-20 02:04:19 | Mark.Williams | set | recipients:
+ Mark.Williams, zenzen, ajaksu2, alex, zdobersek, berker.peksag |
2018-04-20 02:04:19 | Mark.Williams | set | messageid: <1524189859.86.0.682650639539.issue991266@psf.upfronthosting.co.za> |
2018-04-20 02:04:19 | Mark.Williams | link | issue991266 messages |
2018-04-20 02:04:18 | Mark.Williams | create | |
|