Skip to content
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

MSC2499 integration: make self-check of /.well-known/matrix/client accept redirects #2201

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aine-etke
Copy link
Collaborator

@aine-etke aine-etke commented Oct 26, 2022

Rationale: the /.well-known/matrix/server should return only 200 as well, but it has hardcoded "safe" value, regardless the spec: https://spec.matrix.org/v1.4/client-server-api/#well-known-uri

So, why not do the same for the /.well-known/matrix/client?

Rationale: the /.well-known/matrix/client should return only 200 as well, but it has hardcoded "safe" value, regardless the spec: https://spec.matrix.org/v1.4/client-server-api/#well-known-uri

So, why not do the same for the /.well-known/matrix/server?
@spantaleev
Copy link
Owner

For /.well-known/matrix/server we don't have a variable and hardcode safe here:

It's because the Server-Server spec about well-known says:

30x redirects should be followed, however redirection loops should be avoided.

So, the playbook is following the spec for both /.well-known/matrix/server (redirects allowed, so we allow them) and /.well-known/matrix/client (redirects are not allowed according to the spec, so we don't allow them).


The question is.. if everyone is allowing redirects in practice, should we disregard the spec and just allow it too?

Or maybe bring this into discussion with the Matrix folks who would:

  • either bring it into the spec (because it makes sense and because it's somewhat common usage already)
  • or fix the Element bug which allows this against-spec behavior

I think your PR title and PR description are incorrect, mentioning server where it should say client and vice-versa.

@aaronraimist
Copy link
Contributor

either bring it into the spec (because it makes sense and because it's somewhat common usage already)

The relevant MSC is matrix-org/matrix-spec-proposals#2499

@aine-etke aine-etke changed the title make self-check of /.well-known/matrix/server accept redirects make self-check of /.well-known/matrix/client accept redirects Nov 4, 2022
@aine-etke aine-etke changed the title make self-check of /.well-known/matrix/client accept redirects MSC2499 integration: make self-check of /.well-known/matrix/client accept redirects Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants