matrix-org / matrix-org/mjolnir

Decentralized reporting requires the reporter to either be in the management room or `config.acceptInvitesFromSpace`.

Open
#475 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

T-Other
Dominant language
TypeScript
Stars
445
Forks
75
Avg merge
2d 44m
Merged PRs (30d)
3

Description

The way room moderator reporting currently seems to work is that the same user is used to relay reports to the management room as is used by Mjolnir to protect rooms. A reporter invites the mjolnir user to a DM in order to send the report, which mjolnir will only accept if the reporter is in the management room or the space specified in `config.acceptInvitesFromSpace`.

For report-to-moderator to work properly, you'd expect that anyone could invite the relay bot, but this can't be allowed when the same user is being used as the protection and relay roles, not only because accepting any invite is an abuse vector, but also because it conflicts with `config.protectAllJoinedRooms`. Anyone would be able to use your Mjolnir to protect their rooms just by inviting it.

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 by tracing the report-to-moderator flow and how invites are handled under config.acceptInvitesFromSpace and config.protectAllJoinedRooms. Review how the protection and relay roles share a user, then define a change that lets reporters reach the relay without allowing arbitrary rooms to use Mjolnir for protection; the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authorization, backend, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.