element-hq / element-hq/element-meta

Media repo can cause you to be 'logged out for security reasons'

Open
#1,520 4 comments 0 reactions 0 assignees View on GitHub
A-Media P2 S-Major T-Defect
Dominant language
No language data
Stars
112
Forks
25
Avg merge
6h 6m
Merged PRs (30d)
4

Description

### Description

Here's what happened:
* Restarted synapse, which takes a little while
* Riot correctly said it went offline
* While it was offline, I clicked into another room so I could keep reading messages while synapse was starting up
* The media requests for this room got a 403 from the media repo (which is independent and had a bug: https://github.com/turt2live/matrix-media-repo/issues/86 )
* "You have been logged out for security reasons"
* Synapse started up fine after I was already logged out

Admittedly this is a weird failure mode, however it is a really annoying problem - even if also rare. This is more of a problem if your media repository runs independently of synapse (either via a worker or as a whole other thing).

Given the media repo is something that can be run independently, it feels wrong to have people be logged out (and lose their e2e history no less) due to 403's returned from the repo. The media repo may very well have a different authentication system (or a bug, in this case) where it returns a valid 403.

A 403 from the rest of the client/server API is still perfectly reasonable in my mind to log someone out.

### Version information

- **Platform**: web (in-browser)
- **Browser**: Chrome 64
- **OS**: Windows 10
- **URL**: riot.im/develop

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.