Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

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

Open
anoadragon453 opened this issue Aug 24, 2020 · 0 comments
Open

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

anoadragon453 opened this issue Aug 24, 2020 · 0 comments
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution

Comments

@anoadragon453
Copy link
Member

anoadragon453 commented Aug 24, 2020

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

@anoadragon453 anoadragon453 changed the title Room and group names should be limited to 65K chars Room and group names should be limited to a sensible value Aug 24, 2020
@babolivier babolivier added Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution z-p2 (Deprecated Label) labels Aug 24, 2020
@richvdh richvdh changed the title Room and group names should be limited to a sensible value Room and group names should be limited to a sensible length Aug 27, 2020
@erikjohnston erikjohnston added S-Minor Blocks non-critical functionality, workarounds exist. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. O-Uncommon Most users are unlikely to come across this or unexpected workflow and removed z-p2 (Deprecated Label) T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. labels Dec 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution
Projects
None yet
Development

No branches or pull requests

3 participants