Repository navigation
Conversation
The `cancel`, `restart` and `send` delayed event endpoints accepted unauthenticated requests and acted on any delayed event with a matching `delay_id`. MSC4140 now specifies these as authenticated endpoints that only act on the requesting user's own delayed events, returning 404 `M_NOT_FOUND` otherwise, and makes every delayed event endpoint available to guests. Authenticate the four management servlets (allowing guests), pass the requester through to the handler, and scope the three store lookups to the requester's localpart, as the single-event lookup already does. The management ratelimiter is now always keyed on the requester, so the source-IP fallback and its mention in the config docs are removed. The two GET servlets also allow guests now.
…cated-management # Conflicts: # tests/rest/client/test_delayed_events.py
2 of 12 tasks
This was referenced Sep 24, 2026
…cated-management # Conflicts: # synapse/handlers/delayed_events.py # tests/rest/client/test_delayed_events.py
Member
There was a problem hiding this comment.
(pre-review note) heads up that Complement tests for delayed events appear to be failing due to 401 errors.
Looks like the tests will need to be updated to add authorisation to the requests.
Collaborator
Author
There was a problem hiding this comment.
👍 I have a complement PR to make sure that delayed events are managed with authenticated requests: matrix-org/complement#924
The complement PR can be merged before and it would make the tests on this PR pass.
Member
There was a problem hiding this comment.
I've merged matrix-org/complement#924 and re-ran the Complement tests on this PR.
anoadragon453
self-requested a review
October 9, 2026 10:41
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This depends on matrix-org/complement#924
In an earlier version of the MSC4140, the randomness of
delay_idwas the security against spoofing, but since then the MSC has changed to:What changes
cancel,restartandsendrequire an access token and answer 404 for adelay_idthat belongs to another userrc_delayed_event_mgmtdocumentation updated accordinglyGET /delayed_events/{delay_id}andGET /delayed_eventsallow guestscancel,restartandsendallow guests tooPull Request Checklist
EventStoretoEventWorkerStore.".code blocks.