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 brayer.benoit
Recipients brayer.benoit
Date 2020-09-02.16:41:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1599064864.53.0.936259028803.issue41695@roundup.psfhosted.org>
In-reply-to
Content
Using python3.8.5, SimpleCookie parser seems to be unable to load the cookie string when a json string is used inside one of the cookie values.

I did not try to replay using other python3 versions yet.

Please use the following code to replay the bug:

>>> from http import cookies
>>> cookie_parser = cookies.SimpleCookie()
>>> cookie_parser.load('CookieScriptConsent={"action":"accept"}; __stripe_mid=plip; __stripe_sid=plop; _ga=tada; _gcl_au=pouet; _hjid=hello; authn_token=mylogin; rememberMe=true')
>>> cookie_parser.keys()
dict_keys([])
>>> cookie_parser = cookies.SimpleCookie()
>>> cookie_parser.load('__stripe_mid=plip; __stripe_sid=plop; _ga=tada; _gcl_au=pouet; _hjid=hello; authn_token=mylogin; rememberMe=true')
>>> cookie_parser.keys()
dict_keys(['__stripe_mid', '__stripe_sid', '_ga', '_gcl_au', '_hjid', 'authn_token', 'rememberMe'])
History
Date User Action Args
2020-09-02 16:41:04brayer.benoitsetrecipients: + brayer.benoit
2020-09-02 16:41:04brayer.benoitsetmessageid: <1599064864.53.0.936259028803.issue41695@roundup.psfhosted.org>
2020-09-02 16:41:04brayer.benoitlinkissue41695 messages
2020-09-02 16:41:04brayer.benoitcreate