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

/createRoom creates an empty room when there is an error sending events #8895

Open
@t3chguy

Description

@t3chguy

If somehow your createRoom request is too large, like if for example you send a base64 encoded avatar instead of an mxc URL (wrongly) then the request fails with a 413 but a new Empty room is created and sent to the user with none of the parameters the user asked for.

Example request payload:

{
  "visibility": "public",
  "name": "Test Space 17",
  "creation_content": {
    "type": "m.space"
  },
  "initial_state": [
    {
      "type": "m.room.avatar",
      "content": {
        "avatar": "data:image/png;base64,iVBOR..............AAAAASUVORK5CYII="
      }
    },
    {
      "type": "m.room.guest_access",
      "state_key": "",
      "content": {
        "guest_access": "can_join"
      }
    }
  ],
  "power_level_content_override": {
    "events_default": 100
  },
  "preset": "private_chat"
}

(avatar truncated Github would not let me post)

image

Expectation: Empty room is not created.

Possibly related to #8625 but am operating in Monolith mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Create-RoomP4(OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patchesS-MinorBlocks non-critical functionality, workarounds exist.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions