matrix-org / matrix-org/matrix-spec

Servers don't enforce PDU format

Open
#1,904 2 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.