Commit graph

430 commits

Author SHA1 Message Date
strawberry 6021cb0a1f partially revert this
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry 0b39bb813e tiny refactoring, split out report_event_route a bit
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry ed86a4aa9e slight misc adjustments
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry 76c5942b4f use user_is_local and server_is_ours more, remove few double filters
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry 9931e60050 use single global function for server name local and user local checking
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry 450f15df4f admin debug command to fetch a server's true destination
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
Jason Volk a124122dd4 daily logging improvements
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk 00ce43d739 remove redundant timers
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk b01d25277d fix remote media error propagation
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk b3984f5337 deduplicate cache control into constant
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk 7e5ed199c9 deduplicate media handler bodies; minor reorg
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
strawberry a81563244f restricted room join typo
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
Jason Volk 15a990dc25 improve various logging
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
strawberry 1b41e35f1d use HTTP 403 (forbidden) instead of HTTP 400 for membership failed auth checks
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry eb10e7d39b fix(appservices): don't perform identity assertion when auth is optional
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry 66bb88a03a make everything pub(crate) instead of pub
conduwuit is not a library

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry 472c32f453 conduit "library" delete, resolve some warnings from that
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry b8a748815a dont allow admin room to be made world readable
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry acbe3bfbda use global valid_cidr_range everywhere else
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
Jason Volk 22bebb9b74 various logging improvements.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
strawberry 93c3e6dec8 forgor is_err check too
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry ebc59e6f15 some more room alias helper logging
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry 5acb110f2b remove unnecessary continue
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry 69968b94ea flip this
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry 8a767c4b10 on room alias joins, attempt to find the room ID through *more* servers if available
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry 8ad42a85ef dont eat the ?server_name= param for join room by ID or alias
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry 19255c0c14 use max_request_size in axum.rs
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
Jason Volk 05477150a2 Upgrade hyper/axum/tower/http stack.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
strawberry a3c53036d5 cargo fmt
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry a64cbd0304 fix wrong warn message
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry 7300103796 check if user is allowed to invite for restricted room join
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-17 14:51:08 -04:00
Matthias Ahouansou 19e4befcb8 feat(appservice): ensure users/aliases outside of namespaces are not accessed
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-17 14:51:08 -04:00
strawberry 641399e900 dont auto join rooms if registrations are from appservices
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-17 14:51:08 -04:00
strawberry c5c8934db7 default to shared room history visibility if invalid (per spec)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-17 14:51:08 -04:00
Jason Volk 33cc3d56c1 lazy-construct presence; avoids useless db queries in sender and syncer.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-17 14:51:08 -04:00
strawberry 97c63604fd "global" ACLs config option, block room directory requests to forbidden servers
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-17 14:51:08 -04:00
Matthias Ahouansou 59be0b3ddc sync upstream token/appservice auth code
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-17 14:51:08 -04:00
strawberry 527a5cbd73 don't allow moderators dangerous permissions, fix pl 100 state_default
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-14 23:05:26 -04:00
strawberry d1c139de26 add config option for url_preview_domain_explicit_denylist
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-14 22:35:23 -04:00
Jason Volk cdb2dff7dd federation incoming logging/tracing related
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-14 22:35:23 -04:00
Jason Volk dba0575e75 some optimizations to get_auth_chain()
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-14 22:35:23 -04:00
Jason Volk c4ebc2f1d1 fix double-deserialization in federation transaction handler.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-14 22:35:23 -04:00
strawberry 878dcd71bb fix invalid database code for servers_invite_via
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-14 22:35:23 -04:00
strawberry 59ba3e3190 only allow admins to send room state events by default (e.g. ACLs)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-14 22:35:23 -04:00
strawberry 27f8c5b63d don't debug log device display name for guest registrations
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-14 22:35:23 -04:00
strawberry eceef5efa2 add config option for allowing guests to auto join rooms
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-14 22:35:23 -04:00
strawberry d95c02f575 add config option for logging guest regs in admin room
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-14 22:35:23 -04:00
strawberry f263630ac1 fix: use path_and_query() for "uri" in request_map for signatures
resolves X-Matrix signatures being invalid in some edge-cases,
and fixes Complement/Sytest federation tests

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-14 22:35:23 -04:00
strawberry 168858c8de port room directory auth to new auth stuff
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-14 22:35:23 -04:00
Matthias Ahouansou a0b65eda1e merge the huge authentication MR mess (reject requests with authentication when not used)
and (fix: allow invalid auth when no auth is required)

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-14 22:35:23 -04:00