Tom Foster
d1ebcfaf0b
fix(auth): prevent token collisions and optimise lookups
...
Ensures access tokens are unique across both user and appservice tables to
prevent authentication ambiguity and potential security issues.
Changes:
- On startup, automatically logout any user devices using tokens that
conflict with appservice tokens (resolves in favour of appservices)
and log a warning with affected user/device details
- When creating new user tokens, check for conflicts with appservice tokens
and generate a new token if a collision would occur
- When registering new appservices, reject registration if the token is
already in use by a user device
- Use futures::select_ok to race token lookups concurrently for better
performance (adapted from tuwunel commit 066097a8)
This fix-forward approach resolves existing token collisions on startup
whilst preventing new ones from being created, without breaking existing
valid authentications.
The find_token optimisation is adapted from tuwunel (matrix-construct/tuwunel)
commit 066097a8: "Optimize user and appservice token queries" by Jason Volk.
2025-08-10 17:10:06 +01:00
nexy7574
331832616f
feat(space-upgrades): MSC4168: Override space child vias
2025-07-19 18:37:45 +01:00
nexy7574
57868a008c
feat(space-upgrades): Skip empty state events in room upgrade
2025-07-19 18:37:45 +01:00
nexy7574
f063814d94
fix(space-upgrades): Incorrectly updated parent children events
2025-07-19 18:37:38 +01:00
nexy7574
3b5335630d
feat(space-upgrades): Transfer all state keys during upgrade
...
Before this change, only state events with an
empty state key would be cloned.
This allows m.space.child to be cloned appropriately.
2025-07-19 18:35:59 +01:00
nexy7574
b2883c3d6e
feat(space-upgrades): Update parent spaces in upgrade
...
This relies on the room being upgraded referencing
the space itself, but there isn't an easy way to
do it otherwise.
2025-07-19 18:35:58 +01:00
nexy7574
62bdfe1ce8
feat(space-upgrades): Copy over space child & parent states
2025-07-19 18:35:56 +01:00
Nyx
5bf20db8e7
Add /_continuwuity/ paths
2025-07-14 17:49:06 +00:00
nexy7574
1abe8f7835
fix: Creation bug
2025-07-12 22:37:49 +01:00
nexy7574
f0994355d4
feat(recaptcha): Fix linting issues
2025-07-08 19:15:55 +01:00
nexy7574
df1cb10a8e
feat(recaptcha): Add documentation for new fields
2025-07-08 19:03:35 +01:00
nexy7574
651d07a609
feat: Add ReCaptcha registration flow
2025-07-08 18:58:05 +01:00
Odd E. Ebbesen
564e7097e6
feat: #821 - Options to disable local typing and read receipts
2025-07-08 12:43:48 +02:00
Jade Ellis
293e7243b3
style: Fix formatting/clippy issues
2025-07-02 19:32:50 +01:00
Jason Volk
c5c309ec43
Split timeline service.
...
Signed-off-by: Jason Volk <jason@zemos.net >
2025-07-02 19:29:28 +01:00
Jason Volk
c06aa49a90
Fix regression 75aadd5c6a
...
Signed-off-by: Jason Volk <jason@zemos.net >
2025-07-02 19:17:09 +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
af4f66c768
Cleanup/improve other async queries in some client handlers.
...
Signed-off-by: Jason Volk <jason@zemos.net >
2025-07-02 19:12:51 +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
3d0360bcd6
Dedup and parallelize current key backup count and etag fetching.
...
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
Jason Volk
21bbee8e3c
Simplify api to send notices to admin room
...
Signed-off-by: Jason Volk <jason@zemos.net >
2025-07-02 18:58:18 +01:00
Jason Volk
732a77f3a8
Use integrated error instead of panic on some legacy codepaths
...
Signed-off-by: Jason Volk <jason@zemos.net >
2025-07-02 18:58:18 +01:00
Jason Volk
f3dd90df39
Mitigate large futures
...
Signed-off-by: Jason Volk <jason@zemos.net >
2025-07-02 18:58:18 +01:00
Jason Volk
2051c22a28
Support optional device_id's in lazy-loading context.
...
Co-authored-by: Jade Ellis <jade@ellis.link >
Signed-off-by: Jason Volk <jason@zemos.net >
2025-07-02 18:58:17 +01:00
Jason Volk
49f7a2487f
Modernize various sender_user/sender_device lets.
...
Signed-off-by: Jason Volk <jason@zemos.net >
2025-07-02 18:58:14 +01:00
nexy7574
d6aa03ea73
style: Remove extraneous import
2025-07-02 00:53:40 +00:00
nexy7574
6e60918584
feat: Suspend new users on registration
2025-07-02 00:53:40 +00:00
nexy7574
68afb07c27
feat: Stabilise room summary API (MSC3266)
...
# Conflicts:
# Cargo.lock
# Cargo.toml
2025-07-02 00:48:16 +01:00
nexy7574
4f69da47c6
feat: Advertise support for spec v1.8, 1.12, 1.13, and 1.14
2025-07-01 18:38:48 +01:00
nexy7574
24d2a514e2
chore: Resolve linting errors
2025-07-01 18:00:28 +01:00
nexy7574
f49c73c031
feat: Forbid suspended users from sending reports
2025-07-01 15:44:04 +01:00
nexy7574
59912709aa
feat: Send intentional mentions in report messages
2025-07-01 15:42:38 +01:00
nexy7574
97e5cc4e2d
feat: Implement user reporting
2025-07-01 01:55:13 +01:00
nexy7574
72f8cb3038
feat: Do not allow suspended users to send typing statuses
2025-06-29 15:38:01 +00:00
nexy7574
1124097bd1
feat: Only allow private read receipts when suspended
2025-06-29 15:38:01 +00:00
nexy7574
08527a2880
feat: Prevent suspended users upgrading rooms
2025-06-29 15:38:01 +00:00
nexy7574
8e06571e7c
feat: Prevent suspended users uploading media
2025-06-29 15:38:01 +00:00
nexy7574
90180916eb
feat: Prevent suspended users performing room changes
...
Prevents kicks, bans, unbans, and alias modification
2025-06-29 15:38:01 +00:00
nexy7574
d0548ec064
feat: Forbid suspended users from sending state events
2025-06-29 15:38:01 +00:00
nexy7574
5d5350a9fe
feat: Prevent suspended users creating new rooms
2025-06-29 15:38:01 +00:00
nexy7574
a94128e698
feat: Prevent suspended users joining/knocking on rooms
2025-06-29 15:38:01 +00:00
nexy7574
a6ba9e3045
feat: Prevent suspended users changing their profile
2025-06-29 15:38:01 +00:00
nexy7574
286974cb9a
feat: Prevent suspended users redacting events
2025-06-29 15:38:01 +00:00
nexy7574
accfda2586
feat: Prevent suspended users sending events
2025-06-29 15:38:01 +00:00
nexy7574
4b5e8df95c
fix: Add missing init fields
2025-06-29 13:29:27 +01:00
nexy7574
d63c8b9fca
feat: Support passing through MSC4293 redact_events
2025-06-29 13:16:31 +01:00
nexy7574
9b6ac6c45f
fix: Ignore existing membership when room is disconnected
2025-06-29 12:14:20 +00:00
nexy7574
52e042cb06
Always calculate state diff IDs in syncv3
...
seemingly fixes #779
2025-06-28 20:37:40 +00:00
Jacob Taylor
db58d841aa
fix: Only load children of nested spaces
2025-06-25 18:17:06 +01:00