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

Room and group names should be limited to a sensible length #8151

Open
matrixbot opened this issue Dec 18, 2023 · 0 comments
Open

Room and group names should be limited to a sensible length #8151

matrixbot opened this issue Dec 18, 2023 · 0 comments

Comments

@matrixbot
Copy link
Collaborator

matrixbot commented Dec 18, 2023

This issue has been migrated from #8151.


Description

You can set room names and topics to absurdly long strings, which don't fit in a matrix state event. As a result, when you create a room in Element doing so, you get a room with no name/topic as the state event failed to send.

Synapse should fail the /createRoom call instead immediately instead of creating a room with no name/topic.

There's a similar issue with groups, though while the group is created successfully, being able to create groups with unlimited-length names is not ideal.

We already limit the size of usernames to 512 characters, returning a 400 M_UNKNOWN. We can do this again for now, but it'd be nice to get an appropriate error code to return so that clients can show a helpful reason as to why creating the room failed. Related spec issue: https://github.com/matrix-org/matrix-doc/issues/1646

Steps to reproduce

  • Create a room with a reaaaaaaally long name (>65K chars)
  • The /createRoom call fails with a 500
  • Notice that a room is created anyways

Version information

v1.19.0

@matrixbot matrixbot changed the title Dummy issue Room and group names should be limited to a sensible length Dec 21, 2023
@matrixbot matrixbot reopened this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant