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.

invite_room_state is required by Synapse in /_matrix/federation/v2/invite/, contrary to spec #10800

@DMRobertson

Description

@DMRobertson

When writing a complement test I tried to have one homeserver invite another. I sent a request to Synapse and omitted invite_room_state, because both stable and unstable specs marked them as optional. Synapse fell over with a 500 error.

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/synapse/http/server.py", line 258, in _async_render_wrapper
    callback_return = await self._async_render(request)
  File "/usr/local/lib/python3.8/site-packages/synapse/http/server.py", line 446, in _async_render
    callback_return = await raw_callback_return
  File "/usr/local/lib/python3.8/site-packages/synapse/federation/transport/server/_base.py", line 303, in new_func
    response = await func(
  File "/usr/local/lib/python3.8/site-packages/synapse/federation/transport/server/federation.py", line 404, in on_PUT
    invite_room_state = content["invite_room_state"]

Maybe this is just a mistaken assumption made at the rest layer, and it's fine in the handler? If so, I'd guess we want to replace this with a `.get("invite_room_state", []). That's an untested hypothesis though!

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Spec-Complianceplaces where synapse does not conform to the specA-Validation500 (mostly) errors due to lack of event/parameter validationP4(OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patchesS-TolerableMinor significance, cosmetic issues, low or no impact to users.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