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

Contradiction in handling of broken .well-known urls in S2S spec #1854

Closed
JJJollyjim opened this issue Feb 6, 2019 · 1 comment
Closed
Assignees
Labels
s2s Server-to-Server API (federation) spec-bug Something which is in the spec, but is wrong

Comments

@JJJollyjim
Copy link
Contributor

JJJollyjim commented Feb 6, 2019

Step 3 of S2S section 2.1 (Resolving Server Names) says about queries to .well-known/matrix/server:

If the response is invalid (bad JSON, missing properties, non-200 response, etc), skip to step 4.

[Step 4 is performing a SRV lookup on the hostname, i.e. continuing name resolution by other means]

But S2S section 2.1.1 says, about the 200 response to this request:

Failures parsing the JSON or invalid data provided in the resulting parsed JSON must result in server discovery failure (no attempts should be made to continue finding an IP address/port number to connect to).

Which of these is preferable? Should the spec be amended to remove the apparent contradiction? Personally, I'm drawn to the approach in 2.1.1, since if the .well-known server is temporarily misconfigured to serve 200s with bad content, we don't want to accidentally connect to a different matrix server, which could be what's specified in the further steps.

@turt2live
Copy link
Member

Should be the first part: continue to SRV. The inaccuracy in 2.1.1 is an inaccuracy - will fix.

@turt2live turt2live self-assigned this Feb 6, 2019
@turt2live turt2live added spec-bug Something which is in the spec, but is wrong s2s Server-to-Server API (federation) r0 P1 labels Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s2s Server-to-Server API (federation) spec-bug Something which is in the spec, but is wrong
Projects
None yet
Development

No branches or pull requests

2 participants