Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve room power level handling #5

Open
7 of 12 tasks
digitalentity opened this issue Feb 13, 2022 · 3 comments
Open
7 of 12 tasks

Improve room power level handling #5

digitalentity opened this issue Feb 13, 2022 · 3 comments

Comments

@digitalentity
Copy link
Owner

digitalentity commented Feb 13, 2022

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:

  • try and clear up what the spec really says
    • can one go higher than 100?
    • should the next spec release make that explicit, so that other homeserver and client developers will be made aware of it?
  • test if such rooms can federate:
    • most importantly with Synapse
    • Dendrite
    • Conduit
  • test other clients:
    • I assume that at least Element (on which platform?) doesn't break
    • and you've probably tested Fluffychat yourself
    • should some other clients be tested?
  • consider whether this should be "on by default and always". It creates a non-standard room that has potential to break and that cannot be fixed (I assume you can't bring m.room.encryption down to 100 or lower, once you've set it to a value than your own power level)
    • a configuration setting may make sense
    • disabling it by default may make sense
    • consider mentioning in the docs (or configuration setting information, if a configuration setting is introduced) that power levels may be replaced with a borked up non-standard risky value
    • .. and that all rooms created while matrix_encyption_disabler is active are forever prevented from becoming encrypted

Originally posted by @spantaleev in #4 (comment)

@digitalentity
Copy link
Owner Author

@digitalentity
Copy link
Owner Author

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
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant