31a05b9c
6aab456466
fix: appservice masquerading requirement check
2026-07-04 18:21:51 +00:00
Ginger
b37480d6b2
fix: Return the correct error code for expired access tokens
2026-06-29 09:35:48 -04:00
Ginger
df3f646c92
feat: Implement oauth auth code and refresh token flows
2026-06-29 09:35:48 -04:00
timedout
62b58e1a6a
fix: SEC16
2026-06-20 16:03:37 +01:00
Ginger
d7a51c7107
refactor: Allow for client identities with no user ID
2026-05-27 12:15:16 -04:00
Ginger
30c9d6d2df
chore: Clippy fixes
2026-05-26 18:26:02 +00:00
Ginger
74841b6711
refactor: Represent route auth information in the type system
2026-05-26 18:26:02 +00:00
Ginger
035bfea93c
fix: Correct error code
2026-05-21 12:11:03 +00:00
Ginger
185f8c42dc
fix: Properly check forbidden_remote_server_names for incoming requests
2026-05-21 12:11:03 +00:00
Ginger
1cd0228d87
fix: Restore functionality of require_auth_for_profile_requests
2026-05-21 12:10:48 +00:00
Ginger
049babc7ca
fix: Fix appservice authentication
2026-04-29 09:09:09 -04:00
Ginger
a9a18fc5f0
fix: Re-add support for custom room IDs
2026-04-28 09:16:57 -04:00
Ginger
a8a8e1ea51
chore: Clippy fixes
2026-04-28 09:16:57 -04:00
Ginger
9899632b8b
chore: Clippy fixes
2026-04-28 09:16:56 -04:00
Ginger
e70004c98f
chore: Clippy fixes
2026-04-28 09:16:56 -04:00
Ginger
0c7abd792d
refactor: Fix errors in api/router/
2026-04-28 09:16:56 -04:00
Jade Ellis
a4e64383b7
refactor: Ruma upstraming, bake a little more
2026-04-28 09:16:51 -04:00
Ginger and Jade Ellis
204bc1367e
refactor: Ruma upstreaming, half-baked edition
...
Co-authored-by: Jade Ellis <jade@ellis.link >
2026-04-28 09:16:51 -04:00
Ginger
f5db4d17d6
feat: Refactor UIAA service, add support for email stage
2026-03-31 02:20:59 +00:00
Niklas Wojtkowiak
18d2662b01
fix(config): remove allow_public_room_directory_without_auth
2026-02-23 17:59:13 +00:00
Jade Ellis
23638cd714
feat(appservices): MSC3202 Device masquerading for appservices
2026-02-22 21:19:20 +00:00
Jade Ellis and dasha_uwu
46907e3dce
chore: Migrate to axum 0.8
...
Co-authored-by: dasha_uwu
2026-02-19 02:18:29 +00:00
timedout
7502a944d7
feat: Add user locking and unlocking commands and functionality
...
Also corrects the response code returned by UserSuspended
2026-01-05 19:30:16 +00:00
nexy7574
cb8f36444c
feat: Proactively read Content-Length to reject oversized uploads
2025-10-12 19:42:57 +00:00
Ginger
e6fd3c970b
fix: Nuke explicit references to the MSC4175 tz profile field
2025-09-16 11:30:39 +00:00
Tom Foster
583cb924f1
refactor: address code review feedback for auth and pagination improvements
...
- Extract duplicated thread/message pagination functions to shared utils module
- Refactor pagination token parsing to use Option combinators instead of defaults
- Split access token generation from assignment for clearer error handling
- Add appservice token collision detection at startup and registration
- Allow appservice re-registration with same token (for config updates)
- Simplify thread relation chunk building using iterator chaining
- Fix saturating_inc edge case in relation queries with explicit filtering
- Add concise comments explaining non-obvious behaviour choices
2025-08-12 05:29:41 +01:00
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
Jade Ellis
fb9d4c30f4
feat: Prefill server name in federation test
2025-05-01 21:23:37 +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
3f0f89cddb
use async_trait without axum re-export
...
Signed-off-by: Jason Volk <jason@zemos.net >
2025-03-31 04:27:20 +00:00
June Clementine Strawberry
c10500f8ae
bump rust-rocksdb and ruwuma
...
Signed-off-by: June Clementine Strawberry <june@3.dog >
2025-03-06 00:14:24 -05:00
Jason Volk
a67ab75417
fix edition 2024 lints
...
Signed-off-by: Jason Volk <jason@zemos.net >
2025-02-27 10:26:45 -05:00
June Clementine Strawberry
a1e1f40ded
run cargo fix for rust 2024 changes and rustfmt
...
Signed-off-by: June Clementine Strawberry <strawberry@puppygock.gay >
2025-02-23 01:17:45 -05:00
Jason Volk
5be07ebc0f
eliminate references to services.globals.config
...
Signed-off-by: Jason Volk <jason@zemos.net >
2025-01-25 01:35:18 +00:00
Jason Volk
0a9b6c136f
refactor for ruma identifiers optimizations
...
Signed-off-by: Jason Volk <jason@zemos.net >
2025-01-01 23:28:01 -05:00
strawberry
77e0b76408
apply new rustfmt.toml changes, fix some clippy lints
...
Signed-off-by: strawberry <strawberry@puppygock.gay >
2024-12-15 01:00:41 -05:00
strawberry
0317cc8cc5
rename conduit to conduwuit finally
...
Signed-off-by: strawberry <strawberry@puppygock.gay >
2024-12-14 22:24:45 -05:00
strawberry
ef8392cbbe
allow empty POST request bodies (synapse behaviour) to improve compatibility
...
Signed-off-by: strawberry <strawberry@puppygock.gay >
2024-12-11 16:38:25 -05:00
strawberry
e9fee04eef
fix needlessly strict appservice user existence check
...
Signed-off-by: strawberry <strawberry@puppygock.gay >
2024-11-24 23:14:19 -05:00
strawberry
4f0bdb5194
general misc bug fixes and slight improvements
...
Signed-off-by: strawberry <strawberry@puppygock.gay >
2024-11-15 09:41:17 -05:00
Jason Volk
86694f2d1d
move non-generic code out of generic; reduce codegen
...
Signed-off-by: Jason Volk <jason@zemos.net >
2024-11-13 02:38:03 +00:00
Jason Volk
6eba36d788
split make_body template
...
Signed-off-by: Jason Volk <jason@zemos.net >
2024-11-08 09:21:42 +00:00
Jason Volk
a7cb1c5951
slightly optimize request signing/verifying
...
Signed-off-by: Jason Volk <jason@zemos.net >
2024-11-03 07:32:09 +00:00
strawberry
d92f2c121f
document nginx needing request_uri
...
Signed-off-by: strawberry <strawberry@puppygock.gay >
2024-10-28 20:52:52 -04:00
Jason Volk
7a09ac81e0
split send from messages; refactor client/messages; add filters to client/context
...
Signed-off-by: Jason Volk <jason@zemos.net >
2024-10-28 20:52:52 -04:00
Jason Volk
ee92a33a4d
add some accessors to Ar for common patterns
...
Signed-off-by: Jason Volk <jason@zemos.net >
2024-10-27 00:11:50 +00:00
strawberry
d6991611f0
add require_auth_for_profile_requests config option, check endpoint metadata instead of request string
...
Signed-off-by: strawberry <strawberry@puppygock.gay >
2024-10-26 18:50:29 -04:00
strawberry
2ce91f33af
log method on tracing req spans, fix path sometimes being truncated
...
Signed-off-by: strawberry <strawberry@puppygock.gay >
2024-10-26 18:50:29 -04:00
Jason Volk
c0939c3e9a
Refactor server_keys service/interface and related callsites
...
Signed-off-by: Jason Volk <jason@zemos.net >
Signed-off-by: strawberry <strawberry@puppygock.gay >
2024-10-26 18:50:29 -04:00