[Python-checkins] r63781 - python/trunk/Doc/library/cookie.rst
georg.brandl
python-checkins at python.org
Thu May 29 09:38:37 CEST 2008
Author: georg.brandl
Date: Thu May 29 09:38:37 2008
New Revision: 63781
Log:
#2988: add note about catching CookieError when parsing untrusted cookie data.
Modified:
python/trunk/Doc/library/cookie.rst
Modified: python/trunk/Doc/library/cookie.rst
==============================================================================
--- python/trunk/Doc/library/cookie.rst (original)
+++ python/trunk/Doc/library/cookie.rst Thu May 29 09:38:37 2008
@@ -22,6 +22,12 @@
MSIE 3.0x doesn't follow the character rules outlined in those specs. As a
result, the parsing rules used are a bit less strict.
+.. note::
+
+ On encountering an invalid cookie, :exc:`CookieError` is raised, so if your
+ cookie data comes from a browser you should always prepare for invalid data
+ and catch :exc:`CookieError` on parsing.
+
.. exception:: CookieError
More information about the Python-checkins
mailing list