]> granicus.if.org Git - python/commitdiff
#2988: add note about catching CookieError when parsing untrusted cookie data.
authorGeorg Brandl <georg@python.org>
Thu, 29 May 2008 07:38:37 +0000 (07:38 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 29 May 2008 07:38:37 +0000 (07:38 +0000)
Doc/library/cookie.rst

index aae7bc27475442c71b14c3fdbedca980aabef8ed..346da5a1fd921eb8a5155db41f5b3dffeaf331ca 100644 (file)
@@ -22,6 +22,12 @@ The module formerly strictly applied the parsing rules described in the
 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