Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Provide context and remove hunt for more useless fields
  • Loading branch information
turt2live committed May 24, 2023
commit 5ce2eecf24ba1017ac9f4867bc8f8a676f693eb5
33 changes: 23 additions & 10 deletions proposals/3989-redact-origin-field.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
# MSC3989: Redact `origin` field on events

The [current redaction algorithm](https://spec.matrix.org/v1.6/rooms/v10/#redactions) *keeps* the
top-level `origin` field on events during redaction, however the only use of it as of writing is
a malformed example of event format. The field has no significant meaning in modern room versions.

Note: some other fields are additionally useless in modern room versions, however they are already
adapted by [MSC2176](https://github.com/matrix-org/matrix-spec-proposals/pull/2176).

This proposal's scope includes *removing* other fields which are useless in modern room versions,
however makes no effort or consideration for *adding* protected fields to the redaction algorithm.
Given MSC2176, the only useless field appears to be `origin`, however the author kindly asks that
reviewers point out other examples as they arise.
top-level `origin` field on events during redaction, however the only use of it within the spec
as of writing is a malformed example of event format. The field has no significant meaning in
modern room versions.

Within the ecosystem, it's clear that we'd [prefer the field to disappear](https://github.com/matrix-org/matrix-spec/issues/374),
and have [tried to do so](https://github.com/matrix-org/matrix-spec/pull/998) in the past. The
malformed examples are even [known to us](https://github.com/matrix-org/matrix-spec/issues/1480).

What's not clear, and mentioned in [a comment](https://github.com/matrix-org/matrix-spec/issues/1480#issuecomment-1495183789),
is whether the `origin` field is *acutally* used. There do not appear to be any auth rules or similar
which would use the field, however it'd hardly be the first time that the spec was wrong about an
ancient room version like v1. What is clear is that Synapse, where this question would be asked,
wants to [drop support](https://github.com/matrix-org/synapse/issues/3816) for the field and has
taken [steps](https://github.com/matrix-org/synapse/pull/8324) towards that mission by fixing bugs
in the area. In a [quick audit](https://github.com/matrix-org/matrix-spec-proposals/pull/3989#issuecomment-1497659507)
of the Synapse codebase during implementation of this MSC, the `origin` field appears unused.

Given the above context, this proposal removes the `origin` field from the redaction algorithm in
future room versions, leaving it as-is for existing versions (not that an MSC can change the behaviour
of an already-stable room version).

Some other fields are additionally useless in modern room versions, however they are already adapted
by [MSC2176](https://github.com/matrix-org/matrix-spec-proposals/pull/2176).

## Proposal

Expand Down