mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-28 16:36:48 +09:00
Sign the browser out when its new session is refused after a password change
If the password changes again between this browser's change and its new session, that session is refused, and the browser is sent to sign in instead of an error.
(cherry picked from commit a476cbfa24)
This commit is contained in:
1 parent
09402c7752
commit
9ca680de02
2 files changed
+13
No files matched your search
@@ -18,6 +18,9 @@ class Users::ProfilesController < ApplicationController
|
||||
else
|
||||
redirect_to user_profile_url, alert: update_alert
|
||||
end
|
||||
rescue ActiveRecord::RecordInvalid
|
||||
# The password changed again before this browser's new session could start, and that change signed it out.
|
||||
redirect_to new_session_url
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in new issue
Block a user