matrix-org / matrix-spec-proposals

Proposals for changes to the matrix specification
Apache License 2.0
1.01k stars 379 forks source link

PDU definitions and appendix section about canonical JSON disagree on maximum integer value #2485

Closed jplatte closed 4 years ago

jplatte commented 4 years ago

The section about canonical JSON states:

Numbers in the JSON must be integers in the range [-(2**53)+1, (2**53)-1].

The PDU definitons on the room version v1, v3 and v4 page all say this about the depth field:

Must be less than the maximum value for an integer (2^63 - 1).

Should the PDU definitions be updated or are they supposed to support a wider range of values than all the other integers in the spec?

richvdh commented 4 years ago

ideally, the pdu definitions should be updated. but there's a wider problem in that synapse doesn't correctly enforce the ranges specified by canonicaljson. see: https://github.com/matrix-org/matrix-doc/issues/1646

turt2live commented 4 years ago

This has now taken the shape of https://github.com/matrix-org/matrix-doc/pull/2540