Skip to content

Conversation

@turt2live
Copy link
Member

Rendered

Implementation requirements:

  • Unstable room version containing both MSC2244 and this MSC's changes.
  • Example of a server processing redactions safely.
  • Example of a client engaging in these rooms.

@turt2live turt2live changed the title MSC: Improving security of MSC2244 MSC4084: Improving security of MSC2244 Dec 18, 2023
@turt2live turt2live marked this pull request as ready for review December 18, 2023 19:37
@turt2live turt2live added proposal A matrix spec change proposal s2s Server-to-Server API (federation) 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. labels Dec 18, 2023

## Alternatives

No significant alternatives not already discussed identified.
Copy link
Member

Choose a reason for hiding this comment

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

One thing that could mitigate abuse of this would be if it was reversible within a given timeframe - ie a cooling off or antiabuse or remorse timeframe. Same for account deactivation. Both could give the user a one-time code they could use to countermand the previous destructive action. If combined with a grace period for redactions in general (which most servers implement), this could be best of both worlds? (And stop floods of reactivation requests to support@...)

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 DAG level gets complicated for all kinds of reasons, but a possible approach here might be to split redactions into two events: one which applies the redaction, and another which actually commits to it. #3531 kinda does this, though a more direct approach would be to have m.room.soft_redaction go out to apply a redaction pending formal redaction. The operation would apply to clients (and maybe servers over the CS API but not storage?) so the effect can be quickly realized. Then, if the moderator or sender regrets that decision they can redact the soft redaction to "cancel" it. If not cancelled, either the client or the server could commit the redaction with today's m.room.redaction event.

Something to consider is who has the ability to undo a redaction, as it'd be a bit weird to think you've redacted your password from the public chat but then a moderator reveals it again.

Copy link
Member

Choose a reason for hiding this comment

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

I guess MSC4117 is a potential answer to this?

Copy link
Member

Choose a reason for hiding this comment

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

alternatively, we could mandate that servers should do a two-phase deletion, and put a recommended grace period on the (mass-)redactions? Then unredacting is "just" a case of someone sending an m.room.unredaction within the grace period (and you wouldn't need to include the content, given servers should still have it to hand).

Copy link
Member

Choose a reason for hiding this comment

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

m.room.soft_redaction is additive to m.room.redaction, I don't think it would even require a new room version. Changing the semantics of m.room.redaction would probably require a new room version to make sure users can tell between reversible and irreversible redactions.


To help ensure that malicious actors are not able to effectively deactivate a user's account, the
existing [`PUT /_matrix/client/v3/rooms/:roomId/send/:eventType/:txnId`](https://spec.matrix.org/v1.9/client-server-api/#put_matrixclientv3roomsroomidsendeventtypetxnid)
endpoint MUST NOT accept `m.room.redaction` events in room versions supporting mass redactions. The
Copy link
Member Author

Choose a reason for hiding this comment

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

this can probably be relaxed to "m.room.redaction events targeting more than one event" rather than "thou shall not redact"

Comment on lines +85 to +87
To ensure that clients are able to actually use mass redactions, a copy of `/send` is introduced with
[User-Interactive Authentication](https://spec.matrix.org/v1.9/client-server-api/#user-interactive-authentication-api)
(UIA) optionally used by the server. The new `PUT /_matrix/client/v4/rooms/:roomId/send/:eventType/:txnId`
Copy link
Member Author

Choose a reason for hiding this comment

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

UIA is now "legacy" and replaced in part by OAuth2: https://spec.matrix.org/v1.15/client-server-api/#client-authentication

It's not clear how to use OAuth2 for UIA-like features like this.

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

Labels

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. proposal A matrix spec change proposal s2s Server-to-Server API (federation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants