-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail-fast behavior on blocked matrix.org/vector.im connections #9828
Comments
The way this is worded I'm not sure if it's a bug or feature request, but I assume a bug report. The behaviour is caused by Riot validating the config.json at launch prior to even knowing what it should be doing (loading user information, etc). I'd love for us to not validate the homeserver only when needed, however that raises some problems. For instance, if a user launches the app and is logged out due to external factors, the app won't have a homeserver configured for them to log back into. We could validate the config when someone visits the login page again, however we were doing this before with massive inconsistencies. We've currently opted to fail-fast, preferring that people configure their Riot config.json correctly. The desktop app is an interesting case though - it'll almost always be pointing at matrix.org and might not work for people due to closed environments, etc. Although the desktop app is configurable in this regard, people are unlikely to do that. Running with the assumption that this is a bug report, I think this needs a @lampholder to make a product decision on how we can improve the fail-fast configuration check to not be so invasive. |
It was a bug report. I can imagine this ending poorly in cases where matrix.org is blocked by a firewall, or you have a major security incident... |
see also #9185 |
Flagging @lampholder to take a look when he's back. |
in summary for @lampholder: Problem: Possible solutions:
It's worth noting that this issue is further amplified by the nature of our application. We are privacy focused, and quite a few people don't see matrix.org (the domain) as embracing this for various reasons we are not going to discuss here. This leads to people (like the OP, presumably) blocking matrix.org intentionally. There's also the part of being decentralized, so the app makes requests to popular domains often enough to trip the "could be harvesting user information" alarms of many adblock/privacy browser extensions. |
@turt2live is anything about the above specific to matrix.org, or could it be said for any riot instance with a configured default HS that is different to the HS the user actually signed in on? |
It'd be the same problem for configured-but-using-different-homeserver instances too. matrix.org just happens to be the largest victim/instigator. |
Also, I wonder if the 'right' behaviour might be that if the default HS can't be reached, we show the regular login/register UX but with a big red rectangle on top saying which the default HS is and that it can't be reached, giving people the option to connect to a different HS if they want to. |
Not to sidetrack this, but for reference, I only wished to block matrix.org because it was not necessary, not because I distrust it. |
Would this DTRT if the client was previously logged in to a different homeserver than the riot configuration specified, by still logging them in seamlessly, or would the same error be shown and the user must manually re-authenticate to their other homeserver? |
I just ran into this on my dev setup and it took me ages to work out it was because I just hadn't started my dev HS yet. My suggestions for fixing this are:
|
Conclusions from IRL discussion with @turt2live and @lampholder:
|
Oh yes. I meant to ping Nad for that... |
So I don't forget: plan wrt to design is to iterate on it tomorrow, but for now I'll be focusing on just getting the error to the right page. |
This performs liveliness checks on the auth pages to try and show a friendlier error. Earlier checks in the app startup are expected to not block the app from loading on such failures. See element-hq/element-web#9828
Also warn about deprecated config option usage. See #9828
From some internal chat, we settled on:
|
Description
I believe since afdaca0, riot is failing fast on connection errors to matrix.org. I use umatrix, and had previously had matrix.org blocked (because I self host synapse and it wasn't necessary), but upon reloading /develop I got the message "Homeserver URL does not appear to be a valid Matrix homeserver", and according to umatrix, no other third party requests were made.
This fail-fast behavior could also potentially serve an issue for local clients that are unable to reach matrix.org's synapse, even when the configured synapse server is reachable.
Steps to reproduce
Version information
For the web app:
The text was updated successfully, but these errors were encountered: