matrix-org / matrix-org/mjolnir
Decentralized reporting requires the reporter to either be in the management room or `config.acceptInvitesFromSpace`.
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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