Skip to content

Apply strict MSC4311 stripped state validation after 2027-06-01 #19943

Description

@MadLittleMods

MSC4311 says that for "version 12+ rooms, servers SHOULD rather than MAY respond to such requests with 400 M_MISSING_PARAM":

If any of the events are not a PDU, not for the room ID specified, or fail
signature checks, or the m.room.create event is missing, the receiving
server MAY respond to invites with a 400 M_MISSING_PARAM standard Matrix
error (new to the endpoint). For invites to room version 12+ rooms, servers
SHOULD rather than MAY respond to such requests with 400 M_MISSING_PARAM.

-- MSC4311

Currently, we only log in room versions 12+ where this SHOULD be the case already.

After 2027-06-01 (to allow some time for the ecosystem to adapt and support MSC4311), instead of logging, we should reject with 400 M_MISSING_PARAM. Given we have the lee-way to enforce this in all room versions (granted by the MAY langauge in the spec), we might as well. This is marked as a leftover FIXME task in #19723

Definition of done

  • Strictly reject events which don't conform to MSC4311 in room versions 12+ (SHOULD)
  • Strictly reject events which don't conform to MSC4311 in all room versions (MAY)
    • We could push the date out further for room versions <12 as some homeservers will just never update
  • Unskip the TestMSC4311RejectInvalidStrippedStateFederation Complement tests

Dev notes

Synapse PR: #19723

Complement tests: matrix-org/complement#796

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions