|
| 1 | +# MSCXXXX: Aristotle: Moderation in all things |
| 2 | + |
| 3 | +On large public channels (e.g. Matrix HQ), we have too many users abusing the room: |
| 4 | + - Spammers |
| 5 | + - Bullies |
| 6 | + - Invite spammers |
| 7 | + - ... |
| 8 | + |
| 9 | +The Matrix community doesn't have enough moderators to handle all of this, in particular during |
| 10 | +weekends/outside of office hours. |
| 11 | + |
| 12 | +In an ideal world, we should not need to rely upon human moderators being awake to react to |
| 13 | +such abuse, as many users tend to report these types of abuse very quickly. One could imagine, |
| 14 | +for instance, that if 25 long-standing users of Matrix HQ report the same message of a new |
| 15 | +user as spam, said user will be banned temporarily or permanently from the room and/or the |
| 16 | +server as a spammer. |
| 17 | + |
| 18 | +This proposal does NOT include a specific policy for kicking/banning. Rather, it redesigns the abuse |
| 19 | +reporting mechanism to: |
| 20 | + |
| 21 | +- decentralize it; |
| 22 | +- produce formatted data that can be consumed by bots to decide whether action should be taken |
| 23 | + against a user. |
| 24 | + |
| 25 | +This proposal redesigns how abuse reports are posted, routed and treated to make it possible to |
| 26 | +use bots to react to simple cases. |
| 27 | + |
| 28 | +The expectation is that this will allow the Matrix community to experiment with bots that deal |
| 29 | +with abuse reports intelligently. |
| 30 | + |
| 31 | + |
| 32 | +## Proposal |
| 33 | + |
| 34 | +Matrix specs offer a mechanism to report abuse. In this mechanism: |
| 35 | + |
| 36 | +1. a user posts an abuse report for an event; |
| 37 | +2. hopefully, the homeserver administrator for the user's homeserver will handle the abuse report. |
| 38 | + |
| 39 | +In the current state, this mechanism is insufficient: |
| 40 | + |
| 41 | +1. If the abuse report concerns an event in an encrypted room, the homeserver administrator typically |
| 42 | + does not have access to that room, while a room moderator would, hence cannot act upon that report. |
| 43 | +2. Many homeserver administrators do not wish to be moderators, especially in rooms in which they |
| 44 | + do not participate themselves. |
| 45 | +3. As the mechanism does not expose an API for reading the abuse reports, it is difficult to experiment |
| 46 | + with bots that could help moderators. |
| 47 | +4. As the mechanism is per-homeserver, reports from two users of the same room that happen to have accounts |
| 48 | + on distinct homeservers cannot be collated. |
| 49 | +5. There is no good mechanism to route a report by a user to a moderator, especially if they live on different |
| 50 | + homeserver. |
| 51 | + |
| 52 | + |
| 53 | +This proposal redesigns the abuse report spec and suggested behavior as follows: |
| 54 | + |
| 55 | +- Any room can opt-in for moderation. |
| 56 | +- Rooms that opt-in for moderation have a moderation room (specified as a state event). These moderation |
| 57 | + rooms may be shared between several rooms and there may be a default moderation room for a homeserver. |
| 58 | +- Posting an abuse report on a specific event from a room with moderation sends a data message to the |
| 59 | + moderation room. |
| 60 | +- As there may still be a need to report entire rooms, the current abuse report API remains in place for |
| 61 | + reporting entire rooms, although it is expected that further MSCs will eventually deprecate this API. |
| 62 | + |
| 63 | +While this is not part of the MSC, the expectation is that the community may start experimenting with bots that |
| 64 | +can be invited to moderation rooms act upon abuse reports: |
| 65 | + - a bot could pick these data messages and turn them into human-readable reports including context |
| 66 | + and buttons to let moderators easily ignore/kick/ban/redact; |
| 67 | + - a bot could collate reports, ignore those from recently registered users, and decide to kick/ban |
| 68 | + reported users if some threshold is exceeded; |
| 69 | + - ... |
| 70 | + |
| 71 | +### Invariants |
| 72 | + |
| 73 | +- Each room MAY have a state event `m.room.moderation_room`. If specified, this is the room ID towards which |
| 74 | + abuse reports MUST be sent. As rooms may be deleted `m.room.moderation_room` MAY be an invalid room ID. |
| 75 | + |
| 76 | +```jsonc |
| 77 | +{ |
| 78 | + "state_key": "m.room.moderation_room", |
| 79 | + "type": "m.room.moderation_room", |
| 80 | + "content": { |
| 81 | + "room_id": XXX, // The room picked for moderation. |
| 82 | + } |
| 83 | + // ... usual fields |
| 84 | +} |
| 85 | +``` |
| 86 | + |
| 87 | +### Client behavior |
| 88 | + |
| 89 | + |
| 90 | +#### Opting in for moderation |
| 91 | + |
| 92 | +When a user Alice creates a room or when a room moderator accesses the room's configuration, they MAY opt-in for moderation. |
| 93 | +When they do, they MUST pick a moderation room. The client SHOULD check that the moderation room is a room in which Alice |
| 94 | +has a powerlevel sufficient for sending messages. |
| 95 | + |
| 96 | +This room ID is materialized as a state event `m.room.moderation_room`, as described above. |
| 97 | + |
| 98 | +Similarly, if a moderator has opted in for moderation in a room, a moderator MAY opt out of moderation for that room. |
| 99 | +This is materialized as deleting `m.room.moderation_room`. |
| 100 | + |
| 101 | +#### Reporting an event |
| 102 | + |
| 103 | +Any member of a room that supports moderation MAY report an event from that room, by sending a `m.abuse.report` event |
| 104 | +with content |
| 105 | + |
| 106 | +| event_id | **Required** id of the event being reported. | |
| 107 | +| room_id | **Required** id of the room in which the event took place. | |
| 108 | +| nature | **Required** The nature of the event, see below. | |
| 109 | +| comment | Optional. String. A freeform description of the reason for sending this abuse report. | |
| 110 | + |
| 111 | +`nature` is an enum: |
| 112 | + |
| 113 | +- `abuse.disagreement`: disagree with other user; |
| 114 | +- `abuse.toxic`: toxic behavior, including insults, unsollicited invites; |
| 115 | +- `abuse.illegal`: illegal behavior, including child pornography, death threats,...; |
| 116 | +- `abuse.spam`: commercial spam, propaganda, ... whether from a bot or a human user; |
| 117 | +- `abuse.room`: report the entire room, e.g. for voluntarily hosting behavior that violates server ToS; |
| 118 | +- `abuse.other`: doesn't fit in any category above. |
| 119 | + |
| 120 | +We expect that this enum will be amended by further MSCs. |
| 121 | + |
| 122 | +The rationale for requiring a `nature` is twofold: |
| 123 | + |
| 124 | +- a Client may give to give a users the opportunity to think a little about whether the behavior they is truly abuse; |
| 125 | +- this gives the Client the ability to split between |
| 126 | + - `abuse.room`, which should be routed to an administrator; |
| 127 | + - `abuse.disagreement`, which may better be handled by blurring messages from offending user; |
| 128 | + - everything else, which needs to be handled by a room moderator or a bot. |
| 129 | + |
| 130 | +Any `m.abuse.report` message sent to a moderation room is an abuse report. |
| 131 | + |
| 132 | +This proposal does not specify behavior when `m.room.moderation_room` is not set or when the room doesn't exist. |
| 133 | + |
| 134 | + |
| 135 | +### Server behavior |
| 136 | + |
| 137 | +#### Routing messages |
| 138 | + |
| 139 | +When user Alice attempts to send a `m.abuse.report` message _M_ to room _R_: |
| 140 | + |
| 141 | +- if Alice is not a member of _M_`.room_id`, reject the message; |
| 142 | +- if room _M_.`room_id` does not have a state event `m.room.moderation_room`, reject the message; |
| 143 | +- if room _M_.`room_id` has a state event `m.room.moderation_room` and its value is other than _R_, reject the message; |
| 144 | +- if event _M_.`event_id` did not take place in room _M_`.room_id`, reject the message; |
| 145 | +- if Alice could not witness event _M_.`event_id`, reject the message; |
| 146 | +- otherwise, send the message to room _R_ **even if Alice is not a member of room _R_**. |
| 147 | + |
| 148 | +### Possible bot behavior |
| 149 | + |
| 150 | +This section is provided as an illustration of the spec, not as part of the spec. |
| 151 | + |
| 152 | +A possible setup would involve two bots, both members of a moderation room _MR_. |
| 153 | + |
| 154 | +- A classifier bot consumes `m.abuse.report` messages, discards messages from users who have joined recently or never |
| 155 | + been active in the room (possible bots/sleeping bots), then collates reports against users. If there are more than |
| 156 | + e.g. 10 reports in the last hour against a single user, post a `m.policy.rule.user` message in the same room specifying that the user |
| 157 | + should undergo temporary ban. |
| 158 | +- Another bot consumes `m.policy.rule.user` messages and implement bans. |
| 159 | + |
| 160 | +## Open questions |
| 161 | + |
| 162 | +- If all the moderators of room _R_ leave its moderation room _MR_ or are kick/banned from _MR_, we can end up with an orphan |
| 163 | + room _R_, which sends its moderation on _MR_ but doesn't have moderators in _MR_. Do we need to handle this? |
| 164 | +- Should we allow the members or moderators of a moderation room _MR_ to reject a room _R_ from moderation? If so, |
| 165 | + how do we implement this? |
| 166 | + |
| 167 | +## Security considerations |
| 168 | + |
| 169 | +### Routing |
| 170 | + |
| 171 | +This proposal introduces a (very limited) mechanism that lets users send (some) events to a room without being part of that |
| 172 | +room. There is the possibility that this mechanism could be abused. |
| 173 | + |
| 174 | +We believe that it cannot readily be abused for spam, as these are structured data messages, which are usually not visible to members |
| 175 | +of the moderation room. |
| 176 | + |
| 177 | +However, it is possible that it can become a vector for attacks if combined with a bot that treats said structured data messages. |
| 178 | + |
| 179 | +### Revealing oneself |
| 180 | + |
| 181 | +If a end-user doesn't understand the difference between `abuse.room` and other kinds of abuse report, there is the possibility |
| 182 | +that this end-user may end up revealing themself by sending a report against a moderator or against the room to the very |
| 183 | +moderators of that room. |
| 184 | + |
| 185 | +### Snooping administrators |
| 186 | + |
| 187 | +Consider the following case: |
| 188 | + |
| 189 | +- homeserver compromised.org is administered by an evil administrator Marvin; |
| 190 | +- user @alice:compromised.org is a moderator of room _R_ with moderation room _MR_; |
| 191 | +- user @bob:innocent.org is a member of room _R_; |
| 192 | +- @bob:innocent.org posts an abuse report _AR_ to _MR_; |
| 193 | +- Marvin may achieve access to the metadata on report _AR_, including: |
| 194 | + - the fact that @bob:innocent.org has reported something to room _AR_; |
| 195 | +- Marvin also has access to the metadata on _R_, including: |
| 196 | + - the fact that _MR_ is the moderation room for _R_; |
| 197 | + - the fact that @charlie:toxic.org was just banned from _R_; |
| 198 | +- Marvin may deduce that @bob:innocent.org has reported @charlie:toxic.org. |
| 199 | + |
| 200 | +It is not clear how bad this is. |
| 201 | + |
| 202 | +It is also not clear how to decrease the risk. |
| 203 | + |
| 204 | +### Snooping bots |
| 205 | + |
| 206 | +As bots are invited to moderation rooms, a compromised bot has access to all moderation data for that room. |
| 207 | + |
| 208 | +## Alternatives |
| 209 | + |
| 210 | +MSC 2938 (by the same author) has previously been posted to specify a mechanism for reporting events to room moderators. The current MSC is considered |
| 211 | + - simpler to implement; |
| 212 | + - more reliable (it does not need to roll out its own federation communication); |
| 213 | + - less specialized. |
| 214 | + |
| 215 | +I am not aware of other proposals that cover the same needs. |
| 216 | + |
| 217 | +## Unstable prefix |
| 218 | + |
| 219 | +During experimentation |
| 220 | + |
| 221 | +- `m.room.moderation_room` will be prefixed `org.matrix.mscXXXX.room.moderation_room`; |
| 222 | +- `m.abuse.report` will be prefixed `org.matrix.mscXXXX.abuse.report`; |
| 223 | +- `abuse.*` will be prefixed `org.matrix.mscXXXX.abuse.nature.*`. |
| 224 | + |
0 commit comments