#31179: Using the "forgot password" mechanism doesn't invalidate other sessions ----------------------------------------+------------------------ Reporter: Mike Lissner | Owner: nobody Type: Bug | Status: new Component: contrib.auth | Version: master Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | ----------------------------------------+------------------------ (I don't think this is enough of a vuln to not file publicly, since no way to really take advantage of it.)
We just received a vulnerability report that when a user learns that their account has been hijacked, forgets their password, and uses the "Forgot Password" link, Django doesn't invalidate the hijacked cookies, despite the user just changing their password. Django *does* invalidate cookies when passwords are reset via other mechanisms, but not when they're done this way. I haven't tested this, but I think a one-line patch could be added here: https://github.com/django/django/blob/master/django/contrib/auth/views.py#L300-L305 I *think* we just need to add: {{{ update_session_auth_hash(self.request, form.user) }}} And that might do it? -- Ticket URL: <https://code.djangoproject.com/ticket/31179> 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 django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/051.07e55ee7a2ff1094862f980ac51f489e%40djangoproject.com.