Commit graph

144 commits

Author SHA1 Message Date
timedout
7d0686f33c
fix: Error response can leak appservice token
Reviewed-By: Ginger <ginger@gingershaped.computer>
Reviewed-By: Jade Ellis <jade@ellis.link>
2026-02-15 17:58:48 +00:00
timedout
cb75e836e0
style: Update error messages in make_join.rs 2026-02-15 16:11:19 +00:00
nexy7574
ff4dddd673
fix: Refactor local join process 2026-02-15 16:11:18 +00:00
nexy7574
c22b17fb29
fix: Return accurate errors in make_join for restricted rooms 2026-02-15 16:11:18 +00:00
timedout
f82bd77073
style: Fix clippy issues 2026-02-12 19:10:13 +00:00
timedout
7d84ba5ff2
fix: Don't include latest_events in output 2026-02-12 17:37:29 +00:00
timedout
b2ec13d342
fix: Redo the get_missing_events federation route 2026-02-12 16:48:12 +00:00
timedout
0ea0d09b97
fix: Don't fail open when a PDU doesn't have a short state hash 2026-02-06 18:09:09 +00:00
timedout
00c054d356
fix: Get_missing_events returns the same event N times 2026-02-05 21:28:21 +00:00
timedout
082ed5b70c feat: Use info level logs for residency check failures 2026-02-03 20:09:41 +00:00
timedout
c4a9f7a6d1 perf: Don't handle expensive requests for rooms we aren't in
Mostly borrowed from dendrite:

https://github.com/element-hq/dendrite/blob/a042861/federationapi/routing/routing.go#L601
2026-02-03 20:09:41 +00:00
Jade Ellis
d260c4fcc2
style: Fix yo unused variables 2026-01-13 20:29:30 +00:00
timedout
86e450a835
fix: M_BAD_JSON in send_join and send_knock 2026-01-12 17:53:37 +00:00
timedout
279f7cbfe4
style: Fix failing lints 2026-01-05 20:10:29 +00:00
timedout
006c57face
perf: Don't check accept_make_join twice for restricted make_join 2026-01-05 20:10:29 +00:00
timedout
d52e0dc014
fix: Apply check_all_joins to make_join 2026-01-05 20:10:29 +00:00
timedout
4b873a1b95
fix: Apply spam checker to local restricted joins 2026-01-05 20:10:29 +00:00
timedout
76865e6f91
fix: Accept_may_join callback works again 2026-01-05 20:10:29 +00:00
timedout
5ac82f36f3
feat: Consolidate antispam checks into a service
Also adds support for the spam checker join rule, and Draupnir callbacks
2026-01-05 20:10:28 +00:00
timedout
0956779802
feat: Add Meowlnir invite interception support
Co-authored-by: Jade Ellis <jade@ellis.link>
2026-01-05 20:10:27 +00:00
Jade Ellis
aed15f246a
refactor: Clean up logging issues
Primary issues: Double escapes (debug fmt), spans without levels
2026-01-05 18:28:57 +00:00
timedout
bc426e1bfc
fix: Apply client-requested timeout to federated key queries
Also parallelised federation calls in related functions
2026-01-03 16:05:05 +00:00
Jade Ellis
987c5eeb03
refactor: Promote handling unsigned data out of timeline
Also fixes:
- Transaction IDs leaking in event route
- Age not being set for event relations or threads
- Both of the above for search results

Notes down concern with relations table
2025-12-21 17:12:33 +00:00
timedout
7fa4fa9862
fix: Also check sender origin 2025-12-21 10:58:50 +00:00
timedout
b2bead67ac
fix: Apply additional validation to invites 2025-12-21 10:10:54 +00:00
Ginger
800ac8d1f1 fix(sync/v3): Fix invite filtering for federated invites 2025-12-07 19:58:24 +00:00
Ginger
3e6571a2b8 chore: Clippy fixes 2025-12-07 19:58:24 +00:00
Ginger
1c21e4af6e fix: Properly sync left rooms
- Remove most usages of `update_membership` in favor
  of directly calling the `mark_as_*` functions
- Store the leave membership event as the value in the
  `userroomid_leftstate` table
- Use the `userroomid_leftstate` table to synchronize the
  timeline and state for left rooms if possible
2025-12-07 19:58:24 +00:00
nexy7574
a581e8de01 fix: Don't check restricted join rules for invite joins 2025-10-27 14:34:50 +00:00
timedout
cff3c27729
fix: Bump ruwuma, export new route, config loading 2025-10-24 16:37:22 -04:00
Kierre
80be2ca22c
Repair 2025-10-24 16:07:06 -04:00
Kierre
d133b6c0c3
feat: set MSC4373 values 2025-10-24 15:33:16 -04:00
Ginger
13b7538785 Add support for MSC4155 (#1013)
[rendered msc here](https://github.com/Johennes/matrix-spec-proposals/blob/johannes/invite-filtering/proposals/4155-invite-filtering.md). Closes #836.

Co-authored-by: nexy7574 <git@nexy7574.co.uk>
Reviewed-on: https://forgejo.ellis.link/continuwuation/continuwuity/pulls/1013
Reviewed-by: nex <nex@noreply.forgejo.ellis.link>
Co-authored-by: Ginger <ginger@gingershaped.computer>
Co-committed-by: Ginger <ginger@gingershaped.computer>
2025-09-21 17:03:40 +00:00
nexy7574
7e4071c117 Implement room v12 (#943)
**Does not yet work!** Currently, state resolution does not correctly resolve conflicting states. Everything else appears to work as expected, so stateres will be fixed soon, then we should be clear for takeoff.

Also: a lot of things currently accept a nullable room ID that really just don't need to. This will need tidying up before merge. Some authentication checks have also been disabled temporarily but nothing important.

A lot of things are tagged with `TODO(hydra)`, those need resolving before merge. External contributors should PR to the `hydra/public` branch, *not* ` main`.

---

This PR should be squash merged.

Reviewed-on: https://forgejo.ellis.link/continuwuation/continuwuity/pulls/943
Co-authored-by: nexy7574 <git@nexy7574.co.uk>
Co-committed-by: nexy7574 <git@nexy7574.co.uk>
2025-09-17 20:46:03 +00:00
Ginger
e6fd3c970b fix: Nuke explicit references to the MSC4175 tz profile field 2025-09-16 11:30:39 +00:00
nexy7574
09de586dc7
feat(PR977): Log more things in the join process 2025-09-07 22:01:07 +01:00
nexy7574
d1fff1d09f
perf(pr977): Remove redundant ACL check in send_join 2025-09-07 22:01:07 +01:00
nexy7574
f47474d12a
fix(PR977): Adjust some log levels 2025-09-07 22:01:07 +01:00
nexy7574
53da294e53
fix(PR977): Omitting redundant entries from the auth_chain caused problems 2025-09-07 22:01:07 +01:00
nexy7574
2cdccbf2fe
feat(PR977): Support omitting members in the send_join response 2025-09-07 22:01:07 +01:00
Jason Volk
364293608d
Post-formatting aesthetic and spacing corrections
Signed-off-by: Jason Volk <jason@zemos.net>
2025-07-02 19:17:06 +01:00
Jason Volk
116f85360f
Toward abstracting Pdu into trait Event.
Co-authored-by: Jade Ellis <jade@ellis.link>
Signed-off-by: Jason Volk <jason@zemos.net>
2025-07-02 19:03:26 +01:00
Jason Volk
667afedd24
Macroize various remaining Error constructions.
Signed-off-by: Jason Volk <jason@zemos.net>
2025-07-02 19:03:24 +01:00
Jade Ellis
0eb9e4f3d2
refactor: Centralize server forbidden checks into moderation module
This moves all checks related to `forbidden_remote_server_names`,
`forbidden_remote_room_directory_server_names` and
`prevent_media_downloads_from` to a new `moderation` module.
This is useful for implementing more complicated logic globally.
Mostly the changes from #673, but is also relevant for #750
2025-04-19 23:37:54 +01:00
June Clementine Strawberry
d5ad973464
change forbidden_server_names and etc to allow regex patterns for wildcards
Signed-off-by: June Clementine Strawberry <june@3.dog>
2025-04-06 15:25:19 -04:00
Jason Volk
532dfd004d move core::pdu and core::state_res into core::matrix::
Signed-off-by: Jason Volk <jason@zemos.net>
2025-04-05 02:44:46 +00:00
Jason Volk
b7109131e2 further simplify get_missing_events; various log calls
Signed-off-by: Jason Volk <jason@zemos.net>
2025-04-03 22:40:40 +00:00
June Clementine Strawberry
74012c5289
significantly improve get_missing_events fed code
Signed-off-by: June Clementine Strawberry <june@3.dog>
2025-04-02 22:44:44 -04:00
Jason Volk
d3b65af616 remove several services.globals config wrappers
Signed-off-by: Jason Volk <jason@zemos.net>
2025-03-31 03:00:53 +00:00
June Clementine Strawberry
de53ad83b2
run nightly cargo fmt again
Signed-off-by: June Clementine Strawberry <june@3.dog>
2025-03-02 23:15:05 -05:00