mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #31790 -- Fixed setting SameSite and Secure cookies flags in HttpResponse.delete_cookie().
Cookies with the "SameSite" flag set to None and without the "secure" flag will be soon rejected by latest browser versions. This affects sessions and messages cookies.
This commit is contained in:
@@ -890,7 +890,7 @@ Methods
|
||||
|
||||
Using ``samesite='None'`` (string) was allowed.
|
||||
|
||||
.. method:: HttpResponse.delete_cookie(key, path='/', domain=None)
|
||||
.. method:: HttpResponse.delete_cookie(key, path='/', domain=None, samesite=None)
|
||||
|
||||
Deletes the cookie with the given key. Fails silently if the key doesn't
|
||||
exist.
|
||||
@@ -899,6 +899,10 @@ Methods
|
||||
values you used in ``set_cookie()`` -- otherwise the cookie may not be
|
||||
deleted.
|
||||
|
||||
.. versionchanged:: 2.2.15
|
||||
|
||||
The ``samesite`` argument was added.
|
||||
|
||||
.. method:: HttpResponse.close()
|
||||
|
||||
This method is called at the end of the request directly by the WSGI
|
||||
|
||||
17
docs/releases/2.2.15.txt
Normal file
17
docs/releases/2.2.15.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
===========================
|
||||
Django 2.2.15 release notes
|
||||
===========================
|
||||
|
||||
*Expected August 3, 2020*
|
||||
|
||||
Django 2.2.15 fixes a bug in 2.2.14.
|
||||
|
||||
Bugfixes
|
||||
========
|
||||
|
||||
* Allowed setting the ``SameSite`` cookie flag in
|
||||
:meth:`.HttpResponse.delete_cookie` (:ticket:`31790`).
|
||||
|
||||
* Fixed setting the ``Secure`` cookie flag in
|
||||
:meth:`.HttpResponse.delete_cookie` for cookies that use ``samesite='none'``
|
||||
(:ticket:`31790`).
|
||||
@@ -9,4 +9,9 @@ Django 3.0.9 fixes several bugs in 3.0.8.
|
||||
Bugfixes
|
||||
========
|
||||
|
||||
* ...
|
||||
* Allowed setting the ``SameSite`` cookie flag in
|
||||
:meth:`.HttpResponse.delete_cookie` (:ticket:`31790`).
|
||||
|
||||
* Fixed setting the ``Secure`` cookie flag in
|
||||
:meth:`.HttpResponse.delete_cookie` for cookies that use ``samesite='none'``
|
||||
(:ticket:`31790`).
|
||||
|
||||
@@ -55,6 +55,7 @@ versions of the documentation contain the release notes for any later releases.
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
2.2.15
|
||||
2.2.14
|
||||
2.2.13
|
||||
2.2.12
|
||||
|
||||
Reference in New Issue
Block a user