[issue27674] Quote mark breaks cookie processing

Artur Smęt report at bugs.python.org
Wed Aug 3 09:03:52 EDT 2016


Artur Smęt added the comment:

Problem exists in Chrome for sure (it sends cookies as they are - set with JS for example).

I have two another examples that can make this issue more clear:

>>> from Cookie import SimpleCookie
>>> c = SimpleCookie()
>>> c.load('a=b; c=c"c; d=d')
>>> c.output()
'Set-Cookie: a=b'

Also using escaping and quotes (cookie version 1) works:
>>> c = SimpleCookie()
>>> c.load('a=b; c="c\\"c"; d=d')
>>> c.output()
'Set-Cookie: a=b\r\nSet-Cookie: c="c\\"c"\r\nSet-Cookie: d=d'
>>>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27674>
_______________________________________


More information about the Python-bugs-list mailing list