Commit Graph
1493 Commits
Author SHA1 Message Date
Erwan LeboucherandEllis Git 18139ea891 feat(sync): Add MSC4508 typing extension 2026-08-08 14:07:08 +00:00
Erwan LeboucherandEllis Git aa884fad6b feat(sync): Add MSC4480 sticky events 2026-08-03 14:35:53 +00:00
Erwan LeboucherandEllis Git 43197f695c feat(sync): Add MSC4354 sticky events 2026-08-02 17:28:00 +00:00
Erwan Leboucher 7789399ba5 fix(sync): Apply MSC4186 room filters 2026-08-02 18:33:57 +02:00
Erwan Leboucher 27a559a751 fix(sync): Wake sync loops on typing updates 2026-08-02 18:05:27 +02:00
Erwan Leboucher 74591d24e5 fix(sync): Avoid missed long-poll wake-ups 2026-08-02 15:22:18 +00:00
timedoutandErwan Leboucher 71016a0d7f fix: SEC20
Reviewed-By: Ginger <ginger@gingershaped.computer>
Co-Authored-By: Erwan Leboucher <erwanleboucher@gmail.com>
2026-07-29 16:41:59 +01:00
GingerandEllis Git 4e001abe92 feat: Add stable mutual rooms endpoint 2026-07-27 19:28:15 +00:00
timedout 399005abc6 chore: Move registration notice logic 2026-07-27 16:46:36 +01:00
timedoutandEllis Git 7fdc7f9216 fix: Ensure client IP is logged in all registration alert paths 2026-07-27 15:20:07 +00:00
timedoutandEllis Git 795cdd3740 fix: Re-introduce registration alerts 2026-07-27 15:20:07 +00:00
GingerandEllis Git 9a3496ae70 feat: Add admin command to issue access tokens 2026-07-27 14:21:38 +00:00
Erwan LeboucherandEllis Git a0fa4cf0fe fix: Deliver simplified sliding sync account data without hanging 2026-07-26 14:17:21 +00:00
timedout a7892b296f chore: Resolve clippy lints post-rebase 2026-07-26 15:09:52 +01:00
new-years-eveandtimedout 7f8c2aedc8 refactor: Use a shared helper function for submitting state events at room creation
On room creation, A list of initial state events may be provided that
should be submitted to the room after creation. These events
should be treated as any other state event and submitted to
the same checks.

With this change, state events submitted on room creation will be
submitted through the same helper as those through the usual endpoint.

The submission helper is moved to the timeline service to make it
available everywhere. This will be useful for implementing MSC4140
(issue #903).
2026-07-26 15:06:38 +01:00
GingerandEllis Git 7cc5e44093 fix: Exclude deactivated users and AS puppets from user count 2026-07-25 14:16:34 +00:00
reasterandEllis Git a838d59cfc make clippy happy again 2026-07-25 13:55:30 +00:00
reasterandEllis Git fb7a378d63 deduplicate rooms in hierarchy traversal 2026-07-25 13:55:30 +00:00
Erwan Leboucher b144b18aef fix(sync): Verify state for newly-left rooms is in incremental sync 2026-07-21 18:32:34 +00:00
Omar PakkerandEllis Git b9c6d5956f feat: Introduce accepted_ip_sources as a multiple options variant of request_ip_source
The current `request_ip_source` setting only allows a single option.
While it does fall back to the peer IP if the header is missing as of !2003,
which likely covers a lot of regular use, only allowing a single option limits
the deployment options available to more advanced deployments.
Setups where internal and external traffic use different reverse proxies will
end up with the wrong IP and the implicitness of the fallback allows for
situations where the used IP is not the IP expected.

By introducing a setting that allows multiple options to be set,
this limitation is resolved and it becomes possible to have client IP resolution
behind different reverse proxies and also making it possible to decide if and/or
what the fallback should be.

If set, options are evaluated in order. If all fail, the request fails.
2026-07-21 14:35:55 +00:00
Logan DevineandEllis Git 480e975877 chore: clean up unused imports of ClientIp 2026-07-21 14:31:16 +00:00
GingerandEllis Git 4c9426a13f feat: Add support for OAuth2 device auth flow 2026-07-21 13:42:50 +00:00
Deniel9204 25264308ab fix: Use the requested device ID when an appservice creates a device
The appservice branch of update_device_route (MSC4190 device creation)
generated a random device ID instead of using the one from the request
path, and dropped the requested display name. The PUT returned 200, but
the device the appservice asked for never existed, so every subsequent
request masquerading as that device failed with M_FORBIDDEN and one
orphaned random-ID device was left behind per attempt.

This made encrypted mautrix (bridgev2) bridges unable to start on
OIDC-enabled servers, where MSC4190 is the only available device
creation mechanism: /keys/upload failed on first start and /keys/query
on every restart. Combined with the pre-1f5e178c3f behaviour (400
"Token conflicts with an existing appservice token"), MSC4190 device
creation has never worked end-to-end in any release.

Create the device under the requested ID and forward the requested
display name.
2026-07-21 08:21:09 +02:00
timedoutandEllis Git 789589ef37 chore: Remove redundant client IP extractions on individual routes 2026-07-17 12:57:48 +00:00
GingerandEllis Git 3e55d08488 fix: Only return create prompt if registration is enabled 2026-07-17 12:49:15 +00:00
Erwan LeboucherandEllis Git 3a74ce6151 fix(client-ip): Fall back to peer IP instead of returning 500 2026-07-17 12:46:11 +00:00
Erwan LeboucherandEllis Git eff454218c fix(sync): Send full state for newly-joined rooms in incremental sync 2026-07-17 02:48:28 +00:00
Erwan Leboucher 8945cc9e10 fix(federation): Sign restricted join events before verification 2026-07-16 19:46:42 +00:00
N00byKing 232ec3f620 fix: Return 201 instead of 200 on oauth registration
See RFC 7591 at 3.2.1: "The server responds with an HTTP 201 Created status code [...]"

Fixes a failure in matrix-dart-sdk
2026-07-14 11:00:34 +02:00
GingerandEllis Git 24c6474bd1 fix: Allow unstable and stable device id query together 2026-07-13 20:38:10 +00:00
Ginger 1f5e178c3f fix: Properly handle appservice device creation 2026-07-13 08:50:48 -04:00
timedoutandEllis Git 4001b99261 style: Make send_join's docstring more useful 2026-07-12 02:11:50 +00:00
timedoutandEllis Git fbf81fcdeb fix: Opportunistically re-use room format rules when parsing incoming PDUs 2026-07-12 02:11:50 +00:00
timedoutandEllis Git 87030a3a22 fix: Ensure PDU returned by create_hash_and_sign_event is itself signed 2026-07-12 02:11:50 +00:00
timedoutandEllis Git 4f509fa113 fix: Convert room summary to federation format when sending invites 2026-07-12 02:11:50 +00:00
timedoutandEllis Git aa7ed885c0 fix: Check correct field name when determining event type 2026-07-12 02:11:50 +00:00
timedoutandEllis Git d5e6e617d1 fix: Remove redundant banned room server checks
These don't make sense here anyway
2026-07-12 02:11:50 +00:00
timedoutandEllis Git 1f7680ad5f feat: Give send_join the invite treatment 2026-07-12 02:11:50 +00:00
timedoutandEllis Git 0c37a542d4 feat: Give send_leave the invite treatment 2026-07-12 02:11:50 +00:00
timedoutandEllis Git efd07da0d7 feat: Give send_knock the invite treatment 2026-07-12 02:11:50 +00:00
timedoutandEllis Git f0590e882a fix: Only run ACL checks when we know we have live state
Prevents a potential bug where we might inadvertently reject valid invites because we have a stale state cache that blocks the sender or even ourselves

Also fixes the banned remote server room check by using the create event instead of room ID
2026-07-12 02:11:50 +00:00
timedoutandEllis Git 7225bf25ae feat: Persist create events received during the invite process 2026-07-12 02:11:50 +00:00
timedoutandEllis Git e52bb5db69 style: Move invite validation into own functions 2026-07-12 02:11:50 +00:00
timedoutandEllis Git 995726923b feat: Enforce new federation invite checks
These were introduced in spec v1.16 however we didn't implement them until now for compatibility.
2026-07-12 02:11:50 +00:00
GingerandEllis Git cfbe590f1c fix: Do not require an access token on 3pid token request route 2026-07-11 19:40:25 +00:00
GingerandEllis Git ada0b3184b fix: Properly sync newly created rooms 2026-07-11 19:21:19 +00:00
timedout 9d2ce72f73 style: Remove redundant length check for dag build 2026-07-11 17:27:42 +01:00
timedout 5868510df1 fix: Remove redundant "correct room ID" filter 2026-07-11 17:27:42 +01:00
timedout b51a34c1c1 fix: Address review feedback 2026-07-11 17:27:42 +01:00
timedout 64a08262ca perf: Change signature of build_local_dag to remove refmap hacks 2026-07-11 17:27:42 +01:00