[New-bugs-announce] [issue27828] Regression in cookie parsing with single key without value
Yuriy Zhuravlev
report at bugs.python.org
Mon Aug 22 07:14:57 EDT 2016
New submission from Yuriy Zhuravlev:
After I migrated my site to Python 3.5 from 3.4 many users of my site have not been able to login. After small research I found out that users cookies there was a key without value and new Python get empty SimpleCookie result.
Example for Python 3.5.2:
>>> import http.cookies as Cookie
>>> _cookies = Cookie.SimpleCookie()
>>> _cookies.load("rgoods_1=2; __test;")
>>> _cookies
<SimpleCookie: >
Example for Python 3.4.5:
>>> import http.cookies as Cookie
>>> _cookies = Cookie.SimpleCookie()
>>> _cookies.load("rgoods_1=2; __test;")
>>> _cookies
<SimpleCookie: rgoods_1='2'>
I don't know many about right cookie format but drop the wrong key for me is the best solution. I have seen many discussions about Cookie parsers but I was not see words about single keys. If it will be dublicate I am sorry.
----------
components: Library (Lib)
messages: 273355
nosy: Yuriy Zhuravlev
priority: normal
severity: normal
status: open
title: Regression in cookie parsing with single key without value
type: behavior
versions: Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27828>
_______________________________________
More information about the New-bugs-announce
mailing list