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

Add test for state_key size #642

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add test for state_key size #642

wants to merge 3 commits into from

Conversation

S7evinK
Copy link
Contributor

@S7evinK S7evinK commented Jul 7, 2023

Part of #531

Dendrite would fail to parse events with e.g. state keys with > 255 bytes. This could break rooms and end in endless loops.

Dendrite PR

Failing test here: https://github.com/matrix-org/complement/actions/runs/5484535830/jobs/9992205068?pr=642#step:8:835
Passing test in Dendrite: https://github.com/matrix-org/dendrite/actions/runs/5484587106/jobs/9992396957#step:7:616

@S7evinK S7evinK added the dendrite-regression Issue or PR tests a failure in Dendrite label Jul 7, 2023
@S7evinK S7evinK requested review from a team as code owners July 7, 2023 08:44
latestEvent := room.Timeline[len(room.Timeline)-1]

// Sign this bad event which has a too large stateKey
// Synapse always enforced 255 codepoints, but accepts events > 255 bytes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/events/state_keys?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or "events with state keys"?

@DMRobertson
Copy link
Contributor

Xref matrix-org/matrix-spec#1001

Copy link
Contributor

@DMRobertson DMRobertson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems sane to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dendrite-regression Issue or PR tests a failure in Dendrite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants