the-draupnir-project / Draupnir

A Matrix moderation bot
https://the-draupnir-project.github.io/draupnir-documentation/
77 stars 14 forks source link

`ServerBanSynchronisationProtection` seems to be unable to detect ACL is out of date when a server policy has been removed #499

Open Gnuxie opened 1 month ago

Gnuxie commented 1 month ago

Reported by @TheArcaneBrony Context: https://matrix.to/#/%21IaWNErZAgQUhGqJXjX%3Amatrix.org/%24yG1FbGtkJqE-hYRgp17q-XwRDQ4HgvdqvJrIS1GOBwQ?via=matrix.org&via=envs.net&via=ubuntu.com

My suspicion is that the Mjolnir era code that tests this has been changed or broken subtily, but it should be easy to find out by reproducing policy removal.

https://github.com/Gnuxie/matrix-protection-suite/blob/main/src/MatrixTypes/ServerACLBuilder.ts#L99-L127 https://github.com/matrix-org/mjolnir/blob/main/src/models/ServerAcl.ts#L104-L134

TheArcaneBrony commented 1 month ago

Keep in mind this happened after this flow: