element-hq / element-hq/dendrite
Cannot Accept Private Room Invite from Homeserver
- Dominant language
- Go
- Stars
- 965
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Description
*This issue was originally created by [**@ghost**](https://github.com/ghost) at .*
### Background information
- **Dendrite version or git SHA**: 0.11.0
- **Monolith or Polylith?**: monolith
- **SQLite3 or Postgres?**: Postgres
- **Running in Docker?**: Yes
- **`go version`**: N/A
- **Client used (if applicable)**: Element Desktop/Web
### Description
- **What** is the problem: I am unable to fully open a private room with users on any other homeserver.
- **Who** is affected: My homeserver user (`@eglo:humble.cafe`) and my matrix.org user (`@eglo:matrix.org`).
- **How** is this bug manifesting: Errors in the logs state that there is an "Invalid request signature" from "matrix.org" and when attempting to accept the invite it fails.
- **When** did this first appear: As soon as I attempted to test user-to-user message federation.
### Steps to reproduce
- Open Element Desktop, logged into `@eglo:humble.cafe`
- "Start a new chat"
- Type `@eglo:matrix.org`, and click "Go"
- The chat opens and I send a message to initiate the invite.
- On Element Web logged into `@eglo:matrix.org` I attempt to accept the invite, and either receive a generic "Failed" error or a 401 error.
Error message in Element Web (sometimes): `MatrixError: [401] Unauthorized (https://matrix-client.matrix.org/_matrix/client/r0/join/!hRJHJXZjnzcKPUl8%3Ahumble.cafe)`
Messages from homeserver:
```
dendrite-monolith-1 | time="2023-01-29T16:15:14.706481062Z" level=info msg="Invalid request signature" error="Bad signature from \"matrix.org\" with ID \"ed25519:a_RXGa\"" req.id=FjOiqoaRJBMH req.method=GET req.path="/_matrix/federation/v1/make_join/!hRJHJXZjnzcKPUl8:humble.cafe/@eglo:matrix.org"
```
Contributor guide
Research direction
Start by reproducing the invite flow with Element and inspect Dendrite logs for the federation make_join request and its “Invalid request signature” error. Trace the request handling for that endpoint and verify that accepting a private-room invite across homeservers completes without a 401 or signature failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, distributed-systems, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100