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

Clarify handling of bigints in string power levels #1227

Open
jplatte opened this issue Sep 6, 2022 · 1 comment
Open

Clarify handling of bigints in string power levels #1227

jplatte opened this issue Sep 6, 2022 · 1 comment
Labels
clarification An area where the expected behaviour is understood, but the spec could do with being more explicit

Comments

@jplatte
Copy link
Contributor

jplatte commented Sep 6, 2022

Link to problem area: https://spec.matrix.org/v1.3/rooms/v1/#mroompower_levels-events-accept-values-as-strings

Issue

The spec currently doesn't put a limit on the range of integers allowed in string power levels. If this is taken to mean that there is no limit (which is what Synapse implemented, accidentally), this makes it rather complicated to support room versions 1 through 9 in homeservers other than Synapse. As of right now, Dendrite will reject events containing string power levels that exceed the limit of signed 64 bit integers, while Ruma will reject events containing string power levels that exceed the usual MIN_SAFE_INTEGER / MAX_SAFE_INTEGER limits exposed on non-stringified numbers in canonical JSON.

cc @neilalexander @turt2live @tulir

@jplatte jplatte added the clarification An area where the expected behaviour is understood, but the spec could do with being more explicit label Sep 6, 2022
@deepbluev7
Copy link
Contributor

See also #1099 (comment)

Originally it was intended to be part of the clarification, but got removed in the last second.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification An area where the expected behaviour is understood, but the spec could do with being more explicit
Projects
None yet
Development

No branches or pull requests

2 participants