Conversation
MSC4140 describes the delayed event management endpoints
(POST /delayed_events/{delay_id}/{cancel,restart,send}) as authenticated,
and scopes them to the requesting user. Make every management call on
a real delay ID, and the negative tests on an unknown delay ID, go
through the user who scheduled the event instead of the unauthenticated
client.
The only unauthenticated call left is the one asserting that the bulk
GET answers 401 without a token.
…coped Per MSC4140, the management endpoints are authenticated, and a delay ID that does not belong to the requesting user is answered with 404 M_NOT_FOUND. Add two tests: - without a token, each of cancel, restart and send answers 401, and the delayed event stays scheduled; - another user gets 404 for each action on someone else's delay ID, and the delayed event still fires on its original timeout. These need a homeserver that enforces both rules.
This was referenced Sep 23, 2026
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.
This is a sister PR to element-hq/synapse#20257
Delayed Event (MSC4140) management endpoint should be authenticated.
This PR:
Signed-off-by: Paul Chobert paul@chobert.fr