mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-29 00:44:05 +09:00
Sign out the account's other sessions when its password changes
Changing the password is how someone shuts out whoever else is signed
in to their account, but every session opened with the old password
stayed valid. Now the others end and their live connections close, as
on sign-out. The session the password was changed from stays signed in.
Changing the password outside a request, as from a console, ends every
session.
From #371. 1.5.2 has no record snapshot or response cache, so the test
that a cached session lookup doesn't outlive the password change is
left out; the rest applies as it is.
(cherry picked from commit c78c3fd7ef)
This commit is contained in:
1 parent
9474e70f5a
commit
c78f03fda7
4 files changed
+77
No files matched your search
@@ -8,6 +8,8 @@ class Users::ProfilesController < ApplicationController
|
||||
|
||||
def update
|
||||
@user.update user_params
|
||||
disconnect_remote_connections if @user.saved_change_to_password_digest?
|
||||
|
||||
redirect_to user_profile_url, notice: update_notice
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user