Server 1: cleartext.info with this plugin installed and configured. Room !whatever:cleartext.info is created by @user1:cleartext.info
Server 2: paranoid.org without this plugin. User @user2:paranoid.org is participating in the room and is made admin. This can happen automatically if a room is a DM.
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.
Scenario:
cleartext.info
with this plugin installed and configured. Room!whatever:cleartext.info
is created by@user1:cleartext.info
paranoid.org
without this plugin. User@user2:paranoid.org
is participating in the room and is made admin. This can happen automatically if a room is a DM.User
@user2:paranoid.org
setsm.room.encryption
without any restriction.Server
cleartext.info
will reject them.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 modifyingm.room.power_levels
to make the power level form.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 entirem.room.power_levels
event including the room membership.