#23939: SessionAuthenticationMiddleware causes "Vary: Cookie" header no matter
what
---------------------------------+-------------------------------------
Reporter: andrewbadr | Owner: timgraham
Type: Bug | Status: assigned
Component: contrib.auth | Version: 1.7
Severity: Release blocker | Resolution:
Keywords: cookies | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+-------------------------------------
Comment (by carljm):
A couple ideas, but I don't think either one is better than adding a
setting:
1. Could have a new version of `AuthenticationMiddleware` which does the
session validation, and deprecate the current `AuthenticationMiddleware`.
But this is more churn for everyone, and means the new
`AuthenticationMiddleware` would have a less obvious name. Bad idea.
2. Could keep `SessionAuthenticationMiddleware`, and have it re-wrap
`request.user` in a second level of lazy object. But - yuck.
The problem with just reverting to your original approach and adding a
setting to enable it, is that it would have the effect of silently
disabling session validation for all projects created using already-
released versions of Django 1.7 (since they wouldn't have that setting).
Is there a use case for a long-term simple way to disable this behavior?
Or is it just a way to preserve sessions across the upgrade that we need?
Personally I think we should be on a deprecation path to making this
always-on; I think it's fine if you have to write your own
`AuthenticationMiddleware` if you don't want it.
--
Ticket URL: <https://code.djangoproject.com/ticket/23939#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.ffd2c3370c14ec19fa1fafebba0ea563%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.