matrix-org / matrix-org/matrix-spec
Servers don't enforce PDU format
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 330
- Forks
- 150
- Avg merge
- 2h 21m
- Merged PRs (30d)
- 3
Description
In the room version specification, it states [the format for PDUs](https://spec.matrix.org/v1.11/rooms/v11/#event-format-1). However, all the requirements are not fully enforced.
For example, you can send an `m.room.canonical_alias` event with `content` of `null` to a room, and despite that `content` must be an object in room version 10, Synapse, Dendrite, and Conduit allow for that event to be appended to the timeline, one way or another.
I have not tested whether all of requirements are enforced, but I would assume there is no explicit validation of the PDU format, with the only checks being side effects of things like authorization checks being performed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the room version 11 event format section linked in the issue and review each stated PDU requirement, using the m.room.canonical_alias example as the first case. Identify which requirements lack explicit enforcement and define completion as validation that rejects malformed PDUs such as a null content value.
Written by the indexing model from the issue text.
Assessment
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100