digitalentity / matrix_encryption_disabler

Mozilla Public License 2.0
14 stars 2 forks source link

Improve room power level handling #5

Open digitalentity opened 2 years ago

digitalentity commented 2 years ago

Does Synapse not validate these power level values? Is 150 a valid value? The m.room.power_levels description in the Matrix 1.2 spec does not seem to explicitly state that you can't use a value higher than 100.

In practice, it seems like you've tested it and Synapse and the clients you've tested don't break, at least not yet.

Still, it seems a little dangerous to use such values. Any homeserver that gets involved with this room over federation may encounter trouble. Even Synapse itself may reject this unusual value if it encounters it over federation (not tested, but it's a reasonable suspicion).


So I think that this feature is a little dangerous to have, especially when enabled by default.

It may make sense to:

_Originally posted by @spantaleev in https://github.com/digitalentity/matrix_encryption_disabler/issues/4#issuecomment-1037894963_

digitalentity commented 2 years ago

Relevant matrix-doc issue https://github.com/matrix-org/matrix-doc/issues/3724

digitalentity commented 2 years ago

can one go higher than 100

Per https://github.com/matrix-org/matrix-doc/issues/3724#issuecomment-1038391593 it seems that there is no hard cap except the maximum allowable integer by canonical json. That's reassuring, but doesn't prevent servers to enforce the cap of 100 (the highest value mentioned by the spec).

digitalentity commented 2 years ago

Federation with an account on matrix.org tested. No issues, power levels propagate correctly. Participation in rooms on other servers (including encrypted) is unaffected.