Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Synapse responds with a 404 with HTML content for unknown URL prefixes #11600

Closed
clokep opened this issue Dec 17, 2021 · 3 comments · Fixed by #11602 or #11930
Closed

Synapse responds with a 404 with HTML content for unknown URL prefixes #11600

clokep opened this issue Dec 17, 2021 · 3 comments · Fixed by #11602 or #11930
Assignees
Labels
S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@clokep
Copy link
Member

clokep commented Dec 17, 2021

See element-hq/element-web#19738 (comment) for some background, but if you request an endpoint for Synapse that doesn't have a prefix registered (see here) then Synapse responds with a 404 including HTML content (the default Twisted 404 handler).

This wasn't an issue when adding new /unstable or /r0 endpoints since the prefix was registered, but the /hierarchy endpoint is the first /v1 endpoint we had. This will also bite us once we need to rev an endpoint to /v2 (or /v4) since neither of those are registered right now.

@clokep clokep added S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. labels Dec 17, 2021
@t3chguy
Copy link
Member

t3chguy commented Dec 17, 2021

then Synapse responds with a 404 including HTML content (the default Twisted 404 handler).

and without an ACAO header so browser-based clients can't even read that its a 404 as the browser just gives them a generic failure due to CORS.

@clokep
Copy link
Member Author

clokep commented Jan 18, 2022

This was reverted due to poor interaction with a legacy feature.

@clokep
Copy link
Member Author

clokep commented Oct 14, 2022

Cross-ref to a similar Dendrite issue: matrix-org/dendrite#2739.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
2 participants