mastodon/app/controllers
Claire 6da135a493
Fix reviving revoked sessions and invalidating login (#16943)
Up until now, we have used Devise's Rememberable mechanism to re-log users
after the end of their browser sessions. This mechanism relies on a signed
cookie containing a token. That token was stored on the user's record,
meaning it was shared across all logged in browsers, meaning truly revoking
a browser's ability to auto-log-in involves revoking the token itself, and
revoking access from *all* logged-in browsers.

We had a session mechanism that dynamically checks whether a user's session
has been disabled, and would log out the user if so. However, this would only
clear a session being actively used, and a new one could be respawned with
the `remember_user_token` cookie.

In practice, this caused two issues:
- sessions could be revived after being closed from /auth/edit (security issue)
- auto-log-in would be disabled for *all* browsers after logging out from one
  of them

This PR removes the `remember_token` mechanism and treats the `_session_id`
cookie/token as a browser-specific `remember_token`, fixing both issues.
2021-11-06 00:13:58 +01:00
..
activitypub Fix followers synchronization mechanism not working when URI has empty path (#16744) 2021-09-15 18:51:16 +02:00
admin Fix statuses order in account's statuses admin page (#16937) 2021-11-04 15:49:35 +01:00
api Add remove from followers api (#16864) 2021-10-18 12:02:35 +02:00
auth Fix reviving revoked sessions and invalidating login (#16943) 2021-11-06 00:13:58 +01:00
concerns
oauth
settings Explicitly set userVerification to discoraged (#16545) 2021-08-26 09:51:22 -05:00
well_known
about_controller.rb
account_follow_controller.rb
account_unfollow_controller.rb
accounts_controller.rb
application_controller.rb Add logging of S3-related errors (#16381) 2021-07-21 18:34:39 +02:00
authorize_interactions_controller.rb Add specific rate limits for posting and following (#13172) 2020-03-08 15:17:39 +01:00
custom_css_controller.rb
directories_controller.rb
emojis_controller.rb
filters_controller.rb
follower_accounts_controller.rb
following_accounts_controller.rb
health_controller.rb
home_controller.rb Change routing paths to use usernames in web UI (#16171) 2021-09-26 05:46:13 +02:00
instance_actors_controller.rb Create instance actor if it hasn't been properly seeded (#15693) 2021-02-09 18:12:54 +01:00
intents_controller.rb
invites_controller.rb Add invite comments (#10465) 2019-08-19 11:40:42 +02:00
manifests_controller.rb
media_controller.rb Fix error when rendering public pages with media attachments (#16763) 2021-10-13 15:27:19 +02:00
media_proxy_controller.rb
public_timelines_controller.rb
relationships_controller.rb Add interrelationship icon (#15149) 2020-11-12 17:43:12 +01:00
remote_follow_controller.rb Fix redirecting non-functional accounts on public pages (#11978) 2019-09-28 01:33:27 +02:00
remote_interaction_controller.rb
shares_controller.rb
statuses_cleanup_controller.rb
statuses_controller.rb
tags_controller.rb Refactor how public and tag timelines are queried (#14728) 2020-09-07 11:02:04 +02:00