﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31179	"Using the ""forgot password"" mechanism doesn't invalidate other sessions"	Mike Lissner	Rishabh Verma	"(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?"	Bug	closed	contrib.auth	dev	Normal	invalid	forgot password, reset password, sessions logs out		Accepted	0	0	0	0	0	0
