digitalentity / matrix_encryption_disabler

Mozilla Public License 2.0
14 stars 2 forks source link

Federated admin can still partly enable encryption #3

Closed digitalentity closed 2 years ago

digitalentity commented 2 years ago

Scenario:

User @user2:paranoid.org sets m.room.encryption without any restriction.

Server cleartext.info will reject the m.room.encryption event during federation sync.

Room is in inconsistent state. Users of the server cleartext.info are unaware that the room is now encrypted and can't sync the keys and read the encrypted messages.

This can be worked around by patching on_room_creation further and modifying m.room.power_levels to make the power level for m.room.encryption event higher than admin (i.e. 101), but I'm not sure if that's possible during room creation - we may have to craft the entire m.room.power_levels event including the room membership.