Skip to content

Enforce type, sender, state_key and room_id lengths using bytes rather than codepoints #338

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

Merged
merged 1 commit into from
Oct 21, 2022

Conversation

neilalexander
Copy link
Contributor

This effectively reverts the change made in 5f66df0 to bytes instead of codepoints, since Synapse will now enforce the same after matrix-org/synapse#13710.

History here is that Synapse originally calculated bytes in Python 2.x, started counting codepoints in Python 3.x pretty much by accident and then the spec was ambiguous after the fact (hence matrix-org/matrix-spec#1001).

Rationale is that bytes are probably easier for implementations to manage and less likely to generate huge indexes for client-side databases (especially where limits might exist like LMDB).

cc @reivilibre

@DMRobertson
Copy link
Contributor

History here is that Synapse originally calculated bytes in Python 2.x,

We later realised this is not the case: see Olivier's writeup in matrix-org/matrix-spec#1001 (comment)

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

Successfully merging this pull request may close these issues.

2 participants