Skip to content

Conversation

@turt2live
Copy link
Member

@turt2live turt2live commented May 27, 2025

Rendered

Disclosure: I am Director of Standards Development at The Matrix.org Foundation C.I.C., Matrix Spec Core Team (SCT) member, employed by Element, and operate the t2bot.io service. This proposal is written and published as a Trust & Safety team member allocated in full to the Foundation.


MSC checklist

FCP tickyboxes

@turt2live turt2live changed the title MSC: Redact on ban MSC4293: Redact on ban May 27, 2025
@turt2live turt2live added proposal A matrix spec change proposal client-server Client-Server API kind:core MSC which is critical to the protocol's success needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. safety labels May 27, 2025
@turt2live turt2live marked this pull request as ready for review May 27, 2025 21:51
Copy link
Contributor

@Gnuxie Gnuxie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes please!

Copy link
Member Author

@turt2live turt2live Jun 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@turt2live
Copy link
Member Author

MSCs proposed for Final Comment Period (FCP) should meet the requirements outlined in the checklist prior to being accepted into the spec. This checklist is a bit long, but aims to reduce the number of follow-on MSCs after a feature lands.

SCT members: please check off things you check for, and raise a concern against FCP if the checklist is incomplete. If an item doesn't apply, prefer to check it rather than remove it. Unchecking items is encouraged where applicable.

Checklist:

  • Are appropriate implementation(s)
    specified in the MSC’s PR description?
  • Are all MSCs that this MSC depends on already accepted?
  • For each new endpoint that is introduced:
    • Have authentication requirements been specified?
    • Have rate-limiting requirements been specified?
    • Have guest access requirements been specified?
    • Are error responses specified?
      • Does each error case have a specified errcode (e.g. M_FORBIDDEN) and HTTP status code?
        • If a new errcode is introduced, is it clear that it is new?
  • Will the MSC require a new room version, and if so, has that been made clear?
    • Is the reason for a new room version clearly stated? For example,
      modifying the set of redacted fields changes how event IDs are calculated,
      thus requiring a new room version.
  • Are backwards-compatibility concerns appropriately addressed?
  • Are the endpoint conventions honoured?
    • Do HTTP endpoints use_underscores_like_this?
    • Will the endpoint return unbounded data? If so, has pagination been considered?
    • If the endpoint utilises pagination, is it consistent with
      the appendices?
  • An introduction exists and clearly outlines the problem being solved.
    Ideally, the first paragraph should be understandable by a non-technical audience.
  • All outstanding threads are resolved
    • All feedback is incorporated into the proposal text itself, either as a fix or noted as an alternative
  • While the exact sections do not need to be present,
    the details implied by the proposal template are covered. Namely:
    • Introduction
    • Proposal text
    • Potential issues
    • Alternatives
    • Dependencies
  • Stable identifiers are used throughout the proposal, except for the unstable prefix section
    • Unstable prefixes consider the awkward accepted-but-not-merged state
    • Chosen unstable prefixes do not pollute any global namespace (use “org.matrix.mscXXXX”, not “org.matrix”).
  • Changes have applicable Sign Off from all authors/editors/contributors
  • There is a dedicated "Security Considerations" section which detail
    any possible attacks/vulnerabilities this proposal may introduce, even if this is "None.".
    See RFC3552 for things to think about,
    but in particular pay attention to the OWASP Top Ten.

@github-project-automation github-project-automation bot moved this to Needs idea feedback / initial review in Spec Core Team Workflow Jun 20, 2025
@turt2live turt2live moved this from Needs idea feedback / initial review to Proposed for FCP readiness in Spec Core Team Workflow Jun 20, 2025
@turt2live turt2live removed the needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. label Jun 20, 2025
@turt2live
Copy link
Member Author

With my SCT hat, I've verified the implementations (though welcome second/third opinions)

@turt2live
Copy link
Member Author

@mscbot concern General clarity/understanding of goals and alternatives

@mscbot mscbot added the unresolved-concerns This proposal has at least one outstanding concern label Jun 28, 2025
@turt2live turt2live added 00-weekly-pings Tracking for weekly pings in the SCT office. 00 to make it first in the labels list. and removed 00-weekly-pings Tracking for weekly pings in the SCT office. 00 to make it first in the labels list. labels Sep 5, 2025
@turt2live turt2live changed the title MSC4293: Redact on ban MSC4293: Redact on kick/ban Sep 6, 2025
@turt2live
Copy link
Member Author

I believe this should be ready for re-review from folks, with an aim towards FCP. There have been no major changes to the core proposal, though the fallback behaviour has shifted in favour of "continue trying your best to send redactions alongside the ban, if you want".

@mscbot resolve General clarity/understanding of goals and alternatives

@mscbot mscbot removed the unresolved-concerns This proposal has at least one outstanding concern label Sep 6, 2025
@turt2live turt2live added the 00-weekly-pings Tracking for weekly pings in the SCT office. 00 to make it first in the labels list. label Sep 6, 2025
```

Note that because `m.room.redaction` supports a `reason` field in the same place as `m.room.member`,
clients which look up that reason by going `event["unsigned"]["content"]["reason"]` will still get
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean event["unsigned"]["redacted_because"]["content"]["reason"]?

Comment on lines +242 to +248
8. A spammer may attempt to work around this MSC's effects by joining and leaving the room during
their spam. This has relatively high cost (the impact of spam is lesser when they aren't joined
to the room, and re-joining will hit a more restrictive rate limit on most servers).

Moderation bots and similar community safety tools are encouraged to add restrictions to the number
of join+leave cycles a user may perform in a short window. This will further reduce the effectiveness
of such an attack. Issue 7 above also applies here.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does one effectively limit the number of joins a given user can perform? If the spammer is on their own homeserver, then there are no CS API rate limits.

What's to stop a user joining a room, waiting 24hrs to clear any join rate-limits, then spamming and sending another join? Relying on banning a user before they finish spamming and sending a state event seems very hopeful, especially when spam is typically reported via bystanders.

Why not just redact all of a user's event history since the creation of the room?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mscbot concern The proposal doesn't prevent users from spamming and sending an m.room.member event to protect the spam event.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally the MSC shied away from doing so for performance concerns, but it feels increasingly valuable to say "anything before the ban", especially to simplify the implementations.

Thoughts from more folks would be helpful for steering the MSC in any particular direction.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My client implementation is at least just "if current state says redact_events, hide all events sent by user". I'm assuming that if a spammer is unbanned, the events have either been redacted explicitly or weren't actually spam and can be shown again.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't a malicious user also get around the redactions by constantly sending displayname changes or no-op m.room.membership events? I'd be in favour of changing it to "anything before the ban". It seems to me like the most common case is that if someone gets banned and their messages redacted, it's likely that we'd prefer to err on the side of redacting too much, rather than redacting too little.

@mscbot mscbot added the unresolved-concerns This proposal has at least one outstanding concern label Sep 9, 2025
as best effort (currently, moderation bots in particular work incredibly hard to ensure they get *every*
event redacted, but can run into delivery, reliability, and completeness issues with 1:1 redactions).

It's also important to note that this proposal intends to compliment mass redactions and coexist in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick:

Suggested change
It's also important to note that this proposal intends to compliment mass redactions and coexist in
It's also important to note that this proposal intends to complement mass redactions and coexist in

@turt2live turt2live removed the 00-weekly-pings Tracking for weekly pings in the SCT office. 00 to make it first in the labels list. label Sep 30, 2025
Comment on lines +176 to +197
## Fallback behaviour

Servers which don't support this feature may be served redacted events over federation when attempting
to fill gaps or backfill. This is considered expected behaviour.

Clients which don't support this feature may see events remain unredacted until they clear their local
cache. Upon clearing or invalidating their cache, they will either receive redacted events if their
server supports the feature, or unredacted events otherwise. This is also considered expected behaviour.

Though this proposal makes it clear that `m.room.redaction` events aren't actually sent, senders of
kicks/bans MAY still send actual redactions in addition to `redact_events: true` to ensure that older
clients and servers have the best possible chance of redacting the event. These redactions SHOULD be
considered "best effort" by the sender as they may encounter delivery issues, especially when using
1:1 redactions instead of mass redactions. "Best effort" might mean using endpoints like
[MSC4194](https://github.com/matrix-org/matrix-spec-proposals/pull/4194)'s batch redaction, or using
the less reliable `/messages` endpoint to locate target event IDs to redact. Senders SHOULD note that
this fallback behaviour will only target events they can see (or be made to see via MSC4194) and might
not be the same events that a receiving client or server sees.

Senders are encouraged to evaluate when they can cease sending fallback redactions like those described
above to minimize the event traffic involved in a ban. For moderation bots this may mean waiting for
sufficiently high *client* implementations existing in their communities.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does a moderation bot provide fallback if the server it is using implements this MSC?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The server's support is a lot less important than the client support I think. The general fallback behaviour is for the bot to do what it normally does alongside setting the flag, though individual projects can (and should) make their own decisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client-server Client-Server API disposition-merge kind:core MSC which is critical to the protocol's success proposal A matrix spec change proposal proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the final comment period. safety unresolved-concerns This proposal has at least one outstanding concern

Projects

Status: Ready for FCP ticks

Development

Successfully merging this pull request may close these issues.