Skip to content

Clarify handling of bigints in string power levels #1227

@jplatte

Description

@jplatte

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    clarificationAn area where the expected behaviour is understood, but the spec could do with being more explicit

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions