summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-29 07:38:37 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-29 07:38:37 (GMT)
commitb77e888f415d72d028361952692006a38c2473c8 (patch)
tree2bc0ea766abca410f36fee33efd1d9f0af9be9d4
parent7943a3295d32daa88c7759d0a22e6e93642673b2 (diff)
downloadcpython-b77e888f415d72d028361952692006a38c2473c8.zip
cpython-b77e888f415d72d028361952692006a38c2473c8.tar.gz
cpython-b77e888f415d72d028361952692006a38c2473c8.tar.bz2
#2988: add note about catching CookieError when parsing untrusted cookie data.
-rw-r--r--Doc/library/cookie.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/cookie.rst b/Doc/library/cookie.rst
index aae7bc2..346da5a 100644
--- a/Doc/library/cookie.rst
+++ b/Doc/library/cookie.rst
@@ -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