New submission from Demian Brecht:

As found in #22931, if an invalid cookie value is found while parsing, the rest 
of the cookie is silently ignored. The expected behavior is undefined in RFC 
6265, but does state that if unexpected values are encountered that user agents 
MAY ignore an entire set-cookie string (not just a subsection of it). Given 
that, invalid cookie portions should likely be handled by either:

1. Ignore the cookie string in its entirety and log an error message, or
2. Ignore invalid cookie-pairs but still parse the rest of the string

The latter would likely be the best path (Postel's law and all)

----------
components: Library (Lib)
messages: 232020
nosy: demian.brecht
priority: normal
severity: normal
status: open
title: Cookie parsing should be more permissive
type: enhancement
versions: Python 3.5

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

Reply via email to