Review comments

This commit is contained in:
Erik Johnston 2019-01-24 18:31:23 +00:00
parent a4ef8d8dd5
commit d148c43050
2 changed files with 7 additions and 1 deletions

View File

@ -674,7 +674,8 @@ class FederationClient(FederationBase):
break
if room_version is None:
# We use this error has that is what
# If the state doesn't have a create event then the room is
# invalid, and it would fail auth checks anyway.
raise SynapseError(400, "No create event in state")
valid_pdus = yield self._check_sigs_and_hash_and_fetch(

View File

@ -1664,6 +1664,11 @@ class FederationHandler(BaseHandler):
create_event = e
break
if create_event is None:
# If the state doesn't have a create event then the room is
# invalid, and it would fail auth checks anyway.
raise SynapseError(400, "No create event in state")
room_version = create_event.content.get("room_version", RoomVersions.V1)
missing_auth_events = set()