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

Fix well-known lookup for sliding sync labs check #12519

Merged
merged 3 commits into from
May 14, 2024

Conversation

t3chguy
Copy link
Member

@t3chguy t3chguy commented May 14, 2024

No description provided.

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@t3chguy t3chguy added the T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems label May 14, 2024
@t3chguy t3chguy requested a review from a team as a code owner May 14, 2024 09:16
@t3chguy t3chguy requested review from richvdh and robintown May 14, 2024 09:16
@t3chguy t3chguy self-assigned this May 14, 2024
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How was it broken?
When was it broken?
Shouldn't we have a test for this?

But ok I guess

@t3chguy
Copy link
Member Author

t3chguy commented May 14, 2024

Introduced by #12307

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@t3chguy t3chguy added this pull request to the merge queue May 14, 2024
Merged via the queue into develop with commit f028188 May 14, 2024
30 checks passed
@t3chguy t3chguy deleted the t3chguy/fix-sliding-sync-check branch May 14, 2024 13:01
@EdGeraghty
Copy link
Contributor

Introduced by #12307

What was, exactly?

@t3chguy
Copy link
Member Author

t3chguy commented May 28, 2024

@EdGeraghty the code which caused the bug this fixes

@EdGeraghty
Copy link
Contributor

@t3chguy that's what I'm asking. Which bug?

If it's respecting paths in the proxyurl, that's not a "bug" I introduced, it's the behaviour of the original check and the current behaviour in ElementX...

@t3chguy
Copy link
Member Author

t3chguy commented May 28, 2024

It was checking the base url not the server name domain. The well known is on the server name not the base url - see https://spec.matrix.org/v1.10/client-server-api/#well-known-uri .

The url constructor check is unrelated to the fix and the msc is unclear whether the path is absolute or relative, I'd argue the former given the specified path starts with a slash. This fix was to un-break the issue when a trailing slash was present on the proxy url as was exercised in the UT https://github.com/matrix-org/matrix-react-sdk/pull/12519/files#diff-7b41a4a2b051bc32d9905662ef8910daed47905334eb2dadb3b0d19be3142ec2R265

it's the behaviour of the original check and the current behaviour in ElementX...

Just because its how EX works doesn't make it right, what's documented in the spec or in this case MSC is what is right. The MSC currently outlines an absolute URL path, not a relative one.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants