diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2020-01-28 15:11:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-28 15:11:22 +0000 |
commit | cc109b79ddf7832022a1403a93cb227135c3bbd6 (patch) | |
tree | a7bd1721a049678fffe8b35dac37b4b7b02b716a /synapse/api/room_versions.py | |
parent | Detect unknown remote devices and mark cache as stale (#6776) (diff) | |
parent | fix bad variable ref (diff) | |
download | synapse-cc109b79ddf7832022a1403a93cb227135c3bbd6.tar.xz |
Merge pull request #6787 from matrix-org/rav/msc2260
Implement updated auth rules from MSC2260
Diffstat (limited to 'synapse/api/room_versions.py')
-rw-r--r-- | synapse/api/room_versions.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/synapse/api/room_versions.py b/synapse/api/room_versions.py index c6f50fd7b9..cf7ee60d3a 100644 --- a/synapse/api/room_versions.py +++ b/synapse/api/room_versions.py @@ -57,6 +57,9 @@ class RoomVersion(object): state_res = attr.ib() # int; one of the StateResolutionVersions enforce_key_validity = attr.ib() # bool + # bool: before MSC2260, anyone was allowed to send an aliases event + special_case_aliases_auth = attr.ib(type=bool, default=False) + class RoomVersions(object): V1 = RoomVersion( @@ -65,6 +68,7 @@ class RoomVersions(object): EventFormatVersions.V1, StateResolutionVersions.V1, enforce_key_validity=False, + special_case_aliases_auth=True, ) V2 = RoomVersion( "2", @@ -72,6 +76,7 @@ class RoomVersions(object): EventFormatVersions.V1, StateResolutionVersions.V2, enforce_key_validity=False, + special_case_aliases_auth=True, ) V3 = RoomVersion( "3", @@ -79,6 +84,7 @@ class RoomVersions(object): EventFormatVersions.V2, StateResolutionVersions.V2, enforce_key_validity=False, + special_case_aliases_auth=True, ) V4 = RoomVersion( "4", @@ -86,6 +92,7 @@ class RoomVersions(object): EventFormatVersions.V3, StateResolutionVersions.V2, enforce_key_validity=False, + special_case_aliases_auth=True, ) V5 = RoomVersion( "5", @@ -93,6 +100,14 @@ class RoomVersions(object): EventFormatVersions.V3, StateResolutionVersions.V2, enforce_key_validity=True, + special_case_aliases_auth=True, + ) + MSC2260_DEV = RoomVersion( + "org.matrix.msc2260", + RoomDisposition.UNSTABLE, + EventFormatVersions.V3, + StateResolutionVersions.V2, + enforce_key_validity=True, ) @@ -104,5 +119,6 @@ KNOWN_ROOM_VERSIONS = { RoomVersions.V3, RoomVersions.V4, RoomVersions.V5, + RoomVersions.MSC2260_DEV, ) } # type: Dict[str, RoomVersion] |