summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2018-04-07 20:09:42 (GMT)
committerGitHub <noreply@github.com>2018-04-07 20:09:42 (GMT)
commitc87eb09d2e3783b0b5dc0d7cb304050cbcc86ad3 (patch)
tree2843f5346789cb667f20de681b4e4ddbd413698c /Doc
parent1d80a561734b9932961c546b0897405a3bfbf3e6 (diff)
downloadcpython-c87eb09d2e3783b0b5dc0d7cb304050cbcc86ad3.zip
cpython-c87eb09d2e3783b0b5dc0d7cb304050cbcc86ad3.tar.gz
cpython-c87eb09d2e3783b0b5dc0d7cb304050cbcc86ad3.tar.bz2
bpo-29613: Added support for SameSite cookies (GH-6413)
* bpo-29613: Added support for SameSite cookies Implemented as per draft https://tools.ietf.org/html/draft-west-first-party-cookies-07 * Documented SameSite And suggestions by members. * Missing space :( * Updated News and contributors * Added version changed details. * Fix in documentation * fix in documentation * Clubbed test cases for same attribute into single. * Updates * Style nits + expand tests * review feedback
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/http.cookies.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/http.cookies.rst b/Doc/library/http.cookies.rst
index fb8317a..f3457a0 100644
--- a/Doc/library/http.cookies.rst
+++ b/Doc/library/http.cookies.rst
@@ -137,11 +137,16 @@ Morsel Objects
* ``secure``
* ``version``
* ``httponly``
+ * ``samesite``
The attribute :attr:`httponly` specifies that the cookie is only transferred
in HTTP requests, and is not accessible through JavaScript. This is intended
to mitigate some forms of cross-site scripting.
+ The attribute :attr:`samesite` specifies that the browser is not allowed to
+ send the cookie along with cross-site requests. This helps to mitigate CSRF
+ attacks. Valid values for this attribute are "Strict" and "Lax".
+
The keys are case-insensitive and their default value is ``''``.
.. versionchanged:: 3.5
@@ -153,6 +158,9 @@ Morsel Objects
:attr:`~Morsel.coded_value` are read-only. Use :meth:`~Morsel.set` for
setting them.
+ .. versionchanged:: 3.8
+ Added support for the :attr:`samesite` attribute.
+
.. attribute:: Morsel.value