This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Mark.Williams
Recipients Mark.Williams, ajaksu2, alex, berker.peksag, zdobersek, zenzen
Date 2018-04-20.02:04:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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:

Why not quote all attribute values?
Date User Action Args
2018-04-20 02:04:19Mark.Williamssetrecipients: + Mark.Williams, zenzen, ajaksu2, alex, zdobersek, berker.peksag
2018-04-20 02:04:19Mark.Williamssetmessageid: <>
2018-04-20 02:04:19Mark.Williamslinkissue991266 messages
2018-04-20 02:04:18Mark.Williamscreate