Fix wording of auth rule 5.1.1

`state_key` is not a subkey of `content`
This commit is contained in:
Richard van der Hoff 2022-10-04 17:57:13 +01:00
parent 6fb950ab6d
commit 66f0b52c27
6 changed files with 12 additions and 6 deletions

View file

@ -45,7 +45,8 @@ The rules are as follows:
2. If sender's domain doesn't matches `state_key`, reject. 2. If sender's domain doesn't matches `state_key`, reject.
3. Otherwise, allow. 3. Otherwise, allow.
5. If type is `m.room.member`: 5. If type is `m.room.member`:
1. If no `state_key` key or `membership` key in `content`, reject. 1. If there is no `state_key` property, or no `membership` property in
`content`, reject.
2. If `membership` is `join`: 2. If `membership` is `join`:
1. If the only previous event is an `m.room.create` and the 1. If the only previous event is an `m.room.create` and the
`state_key` is the creator, allow. `state_key` is the creator, allow.

View file

@ -52,7 +52,8 @@ The complete list of rules, as of room version 3, is as follows:
2. If sender's domain doesn't matches `state_key`, reject. 2. If sender's domain doesn't matches `state_key`, reject.
3. Otherwise, allow. 3. Otherwise, allow.
5. If type is `m.room.member`: 5. If type is `m.room.member`:
1. If no `state_key` key or `membership` key in `content`, reject. 1. If there is no `state_key` property, or no `membership` property in
`content`, reject.
2. If `membership` is `join`: 2. If `membership` is `join`:
1. If the only previous event is an `m.room.create` and the 1. If the only previous event is an `m.room.create` and the
`state_key` is the creator, allow. `state_key` is the creator, allow.

View file

@ -49,7 +49,8 @@ The rules are as follows:
property `m.federate` set to `false`, and the `sender` domain of the event property `m.federate` set to `false`, and the `sender` domain of the event
does not match the `sender` domain of the create event, reject. does not match the `sender` domain of the create event, reject.
4. If type is `m.room.member`: 4. If type is `m.room.member`:
1. If no `state_key` key or `membership` key in `content`, reject. 1. If there is no `state_key` property, or no `membership` property in
`content`, reject.
2. If `content` has a `join_authorised_via_users_server` 2. If `content` has a `join_authorised_via_users_server`
key: key:
1. If the event is not validly signed by the homeserver of the user ID denoted 1. If the event is not validly signed by the homeserver of the user ID denoted

View file

@ -121,7 +121,8 @@ The rules are as follows:
property `m.federate` set to `false`, and the `sender` domain of the event property `m.federate` set to `false`, and the `sender` domain of the event
does not match the `sender` domain of the create event, reject. does not match the `sender` domain of the create event, reject.
4. If type is `m.room.member`: 4. If type is `m.room.member`:
1. If no `state_key` key or `membership` key in `content`, reject. 1. If there is no `state_key` property, or no `membership` property in
`content`, reject.
2. If `content` has a `join_authorised_via_users_server` 2. If `content` has a `join_authorised_via_users_server`
key: key:
1. If the event is not validly signed by the homeserver of the user ID denoted 1. If the event is not validly signed by the homeserver of the user ID denoted

View file

@ -90,7 +90,8 @@ The rules are as follows:
3. If event does not have a `m.room.create` in its `auth_events`, 3. If event does not have a `m.room.create` in its `auth_events`,
reject. reject.
4. If type is `m.room.member`: 4. If type is `m.room.member`:
1. If no `state_key` key or `membership` key in `content`, reject. 1. If there is no `state_key` property, or no `membership` property in
`content`, reject.
2. If `membership` is `join`: 2. If `membership` is `join`:
1. If the only previous event is an `m.room.create` and the 1. If the only previous event is an `m.room.create` and the
`state_key` is the creator, allow. `state_key` is the creator, allow.

View file

@ -76,7 +76,8 @@ The rules are as follows:
3. If event does not have a `m.room.create` in its `auth_events`, 3. If event does not have a `m.room.create` in its `auth_events`,
reject. reject.
4. If type is `m.room.member`: 4. If type is `m.room.member`:
1. If no `state_key` key or `membership` key in `content`, reject. 1. If there is no `state_key` property, or no `membership` property in
`content`, reject.
2. If `membership` is `join`: 2. If `membership` is `join`:
1. If the only previous event is an `m.room.create` and the 1. If the only previous event is an `m.room.create` and the
`state_key` is the creator, allow. `state_key` is the creator, allow.