Commit Graph

5 Commits

Author SHA1 Message Date
Eugene Dyudyunov
b4fecd620b refactor: rename toggle_warnings to toggle_warning (#30458)
Rename toggle_warnings to toggle_warning for consistency with setting_warning.
2022-05-24 11:47:31 -04:00
Tim McCormack
0bf7cc13f6 doc: Small clarification to CookieName Change middleware instructions (#28804) 2021-09-21 13:45:26 +00:00
Manjinder Singh
f34606f8a4 feat: adding monitoring to CookieNameChange middleware (#28730)
* feat: adding monitoring to CookieNameChange middleware

Adding custom attribute: cookie.change_name
if cookie.change_name in transaction and equal 0, cookie with alternate name is detected and deleted
if cookie.change_name in transaction and equal 1, cookie with current name not in request and added
2021-09-14 08:31:36 -04:00
Tim McCormack
f25b395eca feat!: Rename CookieNameChange middleware settings (#28584)
CookieNameChange allowed the use of the expand-contract pattern for
cookies, but the suggested procedure assumed an instantaneous change on
the server side. Without that, there would be a brief window of time where
servers that had received the newer config would be writing cookies that
the servers with old config would not be able to understand.

However, the mechanism can be made seamless by using it *twice* in
succession, with the first usage in a "no-op" configuration. This allows
all the servers to become aware of the new name without using it. The
second change flips the configuration and changes the official name of the
cookie, and during that window both sets of servers are able to understand
both sets of names, even though they're sending a mix of names. This can
then be followed by the usual cleanup.
2021-08-31 16:50:54 +00:00
Manjinder Singh
5d6f163a0b feat: Adding new CookieNameChange middleware (#28404)
Description: Adds a new middleware to help with cookie name changes. It uses the idea of expand and contract, where after we've changed the name, the middleware allows up to accept either a cookie with new name (given higher priority when both are present) or cookie with old name.

This is also helpful when changing domain of a cookie.

impacts: developers, users(anyone that has cookies)
Change depends on django setting changes. See CookieNameChange middleware for more info.
2021-08-25 12:43:21 -04:00