Fixed #32191 -- Made CookieStorage use RFC 6265 compliant format.

Co-authored-by: Craig Smith <hello@craigiansmith.com.au>
This commit is contained in:
Florian Apolloner 2020-12-19 15:38:32 +01:00 committed by Mariusz Felisiak
parent 3eb98743dc
commit 2d6179c819
7 changed files with 91 additions and 14 deletions

View file

@ -31,6 +31,9 @@ details on these changes.
* ``django.core.cache.backends.memcached.MemcachedCache`` will be removed.
* Support for the pre-Django 3.2 format of messages used by
``django.contrib.messages.storage.cookie.CookieStorage`` will be removed.
.. _deprecation-removed-in-4.0:
4.0

View file

@ -69,6 +69,10 @@ Django provides three built-in storage classes in
to prevent manipulation) to persist notifications across requests. Old
messages are dropped if the cookie data size would exceed 2048 bytes.
.. versionchanged:: 3.2
Messages format was changed to the :rfc:`6265` compliant format.
.. class:: storage.fallback.FallbackStorage
This class first uses ``CookieStorage``, and falls back to using

View file

@ -702,6 +702,10 @@ Miscellaneous
* The minimum supported version of SQLite is increased from 3.8.3 to 3.9.0.
* :class:`~django.contrib.messages.storage.cookie.CookieStorage` now stores
messages in the :rfc:`6265` compliant format. Support for cookies that use
the old format remains until Django 4.1.
.. _deprecated-features-3.2:
Features deprecated in 3.2
@ -737,3 +741,8 @@ Miscellaneous
deprecated as ``python-memcached`` has some problems and seems to be
unmaintained. Use ``django.core.cache.backends.memcached.PyMemcacheCache``
or ``django.core.cache.backends.memcached.PyLibMCCache`` instead.
* The format of messages used by
``django.contrib.messages.storage.cookie.CookieStorage`` is different from
the format generated by older versions of Django. Support for the old format
remains until Django 4.1.