Skip to content

Conversation

@Gnuxie
Copy link
Contributor

@Gnuxie Gnuxie commented Oct 2, 2024

@Gnuxie Gnuxie changed the title MSC0000 Hashed moderation policy entities MSC0000: Hashed moderation policy entities Oct 2, 2024
@Gnuxie Gnuxie changed the title MSC0000: Hashed moderation policy entities MSC4205: Hashed moderation policy entities Oct 2, 2024
@Gnuxie Gnuxie marked this pull request as ready for review October 2, 2024 13:49
@turt2live turt2live added proposal A matrix spec change proposal client-server Client-Server API kind:feature MSC for not-core and not-maintenance stuff needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Oct 2, 2024
Copy link
Member

@turt2live turt2live Oct 2, 2024

Choose a reason for hiding this comment

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

Implementation requirements:

  • Client sending hashes
  • Client using hashes

```

In this example, when a moderation tool encounters a new user, or a
new policy, the tool will calculate the base64 encoded sha256
Copy link
Member

Choose a reason for hiding this comment

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

Many places in matrix use url-safe and/or unpadded base64, so if this is standard, it should probably be mentioned explicitly

@tulir tulir removed the needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. label Mar 13, 2025
Comment on lines +56 to +58
Currently the content schema for `m.policy.rule.user` requires the
`entity` field. In order for the `entity` field to be omitted when a
hash has been provided, the entity field will have to become optional.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these events should have a distinct event type. Otherwise parsing the event is dependent on the recommendation, which both excludes ban recommendations from being hashed as well as makes parsing of events harder and technically is a backwards incompatible change. Something like m.hashed_policy.rule.user or similar could work for example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, from my perspective there are policies in the wild that exist with omitted fields already, including the entity field. These were created by the now unmaintained spam police bot in an attempt to keep the context for a policy after unbanning a user.

The omission of entity, and the addition of the unstable hashes property, under the stable m.policy.rule.room, has not to my knowledge produced any significant problems for clients that have naive parsing of policy rules. Issues have also not yet been reported in implementation. But maybe there should be a requirement for a client to implement specific rendering for takedowns (gomuks might already) so that we can be sure.

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

Labels

client-server Client-Server API hacktoberfest-accepted kind:feature MSC for not-core and not-maintenance stuff proposal A matrix spec change proposal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants