New submission from Tim Graham:

Regression in https://hg.python.org/cpython/rev/9e765e65e5cb (affects 2.7 and 
3.2+), similar to issue22931 where inserting an invalid cookie value can cause 
the rest of the cookie to be ignored. A test is attached, and here's a quick 
demo:

Old:
>>> from http.cookies import SimpleCookie
>>> SimpleCookie('a=b; messages=[\"\"]; c=d;')
{'a': 'b', 'c': 'd', 'messages': ''}

New:
>>> SimpleCookie('a=b; messages=[\"\"]; c=d;')
{'a': 'b'}

Reported in Django's tracker, but Django simply delegates to SimpleCookie: 
https://code.djangoproject.com/ticket/25458

----------
components: Library (Lib)
files: cookie-bracket-quotes-test.diff
keywords: patch
messages: 251538
nosy: Tim.Graham
priority: normal
severity: normal
status: open
title: Regression in cookie parsing with brackets and quotes
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40566/cookie-bracket-quotes-test.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25228>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to