mastodon/app/controllers
Claire 3251b8eead 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:17:05 +01:00
..
activitypub Fix anonymous access to outbox not being cached by the reverse proxy (#16458) 2021-11-05 23:46:24 +01:00
admin Fix statuses order in account's statuses admin page (#16937) 2021-11-05 20:29:22 +01:00
api Fix e-mail confirmations API not working correctly (#16348) 2021-06-02 21:07:50 +02:00
auth Fix reviving revoked sessions and invalidating login (#16943) 2021-11-06 00:17:05 +01:00
concerns Fix authentication failures after going halfway through a sign-in attempt (#16607) 2021-11-05 20:27:07 +01:00
oauth Refactor settings controllers (#14767) 2020-09-11 20:56:35 +02:00
settings Fix user email address being banned on self-deletion (#16503) 2021-11-05 23:46:24 +01:00
well_known Fix anonymous access to outbox not being cached by the reverse proxy (#16458) 2021-11-05 23:46:24 +01:00
about_controller.rb Add server rules (#15769) 2021-02-21 19:50:12 +01:00
account_follow_controller.rb Add specific rate limits for posting and following (#13172) 2020-03-08 15:17:39 +01:00
account_unfollow_controller.rb
accounts_controller.rb Further improve the media attached status query for accounts (#16106) 2021-04-26 18:57:46 +02:00
application_controller.rb Fix database serialization failure returning HTTP 500 (#16101) 2021-05-05 19:44:35 +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 Remove set-cookie header on custom.css (#16314) 2021-05-30 17:57:47 +02:00
directories_controller.rb Change trending hashtags to be affected be reblogs (#16164) 2021-05-07 14:33:43 +02:00
emojis_controller.rb Add (back) rails-level JSON caching (#11333) 2019-07-21 22:32:16 +02:00
filters_controller.rb Sort filters by “keyword or phrase” in Settings (#15050) 2020-10-27 03:00:06 +01:00
follower_accounts_controller.rb Fix serialization of followers/following counts when user hides their network (#16418) 2021-11-05 23:46:24 +01:00
following_accounts_controller.rb Fix serialization of followers/following counts when user hides their network (#16418) 2021-11-05 23:46:24 +01:00
health_controller.rb Change health check (#15988) 2021-04-03 02:39:04 +02:00
home_controller.rb Fix other sessions not being logged out on password change (#14252) 2020-07-07 15:26:31 +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 Refactor controllers for statuses, accounts, and more (#11249) 2019-07-08 12:03:45 +02:00
invites_controller.rb Add invite comments (#10465) 2019-08-19 11:40:42 +02:00
manifests_controller.rb Fix redirecting non-functional accounts on public pages (#11978) 2019-09-28 01:33:27 +02:00
media_controller.rb Fix functional user requirements in whitelist mode (#14093) 2020-06-19 19:18:47 +02:00
media_proxy_controller.rb Fix media proxy RedisLocks auto-releasing too fast (#16291) 2021-05-22 15:00:33 +02:00
public_timelines_controller.rb Fix blurhash and autoplay not working on public pages (#11585) 2019-08-16 19:15:05 +02:00
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 Fix functional user requirements in whitelist mode (#14093) 2020-06-19 19:18:47 +02:00
shares_controller.rb Fix blurhash and autoplay not working on public pages (#11585) 2019-08-16 19:15:05 +02:00
statuses_controller.rb Fix error when trying to render component for media without meta (#16112) 2021-05-05 21:16:55 +02:00
tags_controller.rb Refactor how public and tag timelines are queried (#14728) 2020-09-07 11:02:04 +02:00