element-hq / element-hq/synapse

`/createRoom`'s `creation_content` should be validated against the event schema, and rejected if invalid

Open
#17,845 0 comments 0 reactions 0 assignees View on GitHub
A-Create-Room A-Validation O-Uncommon S-Major T-Enhancement
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

### Description

When creating a room via `/createRoom`, `creation_content` can be specified to append information to the `m.room.create` event in the room. For known fields like `predecessor`, it can be important that the correct value type is used, otherwise there may be issues downstream.

Synapse should validate the fields it knows about, and continue to accept unknown fields verbatim.

Related: https://github.com/element-hq/synapse/issues/13664

### Steps to reproduce

- Create a room with `predecessor: "some string"` instead of `predecessor: { object required by spec }`

### Homeserver

matrix.org

### Synapse Version

matrix.org

### Installation Method

Other (please mention below)

### Database

postgresql

### Workers

Multiple workers

### Platform

matrix.org

### Configuration

_No response_

### Relevant log output

```shell
matrix.org
```

### Anything else that would be useful to know?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.