Jason Volk
2e45cb281a
split router::serve units.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 01:20:28 -04:00
Jason Volk
0baa57f5d9
add back unix socket listener.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 01:20:28 -04:00
Jason Volk
faa2b95c84
add unwrap_infallible tool
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 01:20:28 -04:00
strawberry
a41a60ef07
media: dont ignore requested filename on /download for Content-Disposition
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
Jason Volk
a537462d51
replace num_cpus dependency with available_parallelism()
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 18:16:23 -04:00
Jason Volk
ff0b57c89c
remove unused jemalloc dep in main module.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 18:16:23 -04:00
Jason Volk
b94045a468
dissolve key_value/*
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 18:16:23 -04:00
Jason Volk
3122648767
split ruma_wrapper from_request() related.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 18:16:23 -04:00
Jason Volk
3f5349ad76
simplify RumaHandler for Router building.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 18:16:23 -04:00
Jason Volk
27dcf213f1
tweak error strings.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 18:16:23 -04:00
Jason Volk
a1b526b3b7
tweak log levels
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 18:16:23 -04:00
Jason Volk
dc614e11d6
check invite target is our server.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 18:16:23 -04:00
Jason Volk
c5569b4c6e
dedup acl checks
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 18:16:23 -04:00
Jason Volk
71a1285c7b
hoist receipt ACL check
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 18:16:23 -04:00
strawberry
abdda6cf32
check invited user's server against ACLs on /invite
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
4d21f9d962
use ok_or_else instead of ok_or for function calls in server_server.rs
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
1013fe5a42
check for membership join state at /send_join
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
f31b7b9420
ignore inbound EDUs for users that dont belong to origin server
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
e5e358cc68
compare X-Matrix origin + body origin and check PDU/EDU length at /send txn
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
50bc7cc005
check state_key matches sender user at /send_leave
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
445015e9ea
check user ID server against ACLs at /send_leave
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
7a38c12e5d
check for member event type at /send_leave
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
2a77951152
check for membership leave state at /send_leave
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
0256c27363
check if we know about room at /make_leave
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
826edc0a3a
check state_key matches sender user at /send_join
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
a5043a38e1
only allow membership event types at /send_join
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
bfd471a863
check user ID server against ACLs for /send_join
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
3981e77ec6
check user ID server against ACLs for /make_join
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
81bf4b7150
check user ID server against ACLs for /make_leave
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
b8ec763a7c
ignore read receipts from ACL'd servers and users not joined
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
003d4edbfa
debug log receiving typing EDUs for users not in room
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
4f0006d18a
ignore typing EDUs from ACL'd user's servers
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
b822e3a94c
listen on IPv6 localhost by default
...
this is dual-stack by default on linux, resolves
issues with nginx using `localhost` and randomly
choosing between 127.0.0.1 and [::1], causing
intermittent upstream issues
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
68fffe8e96
check room ACLs on sender user's server for incoming PDUs
...
`handle_incoming_pdu`
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
7328ed7509
rename misleading sender_servername
to origin
...
this is the X-Matrix origin/server, NOT the `"sender"``
user's server name.
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 18:16:23 -04:00
strawberry
6269822613
actually fix all let_underscore_must_use lints
...
CI caught some more
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
0877ee6191
allow let underscore use lint for rocksdb create cf for now
...
the workaround needs to be extended to rocksdb caches, but
i dont know that part of code
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
7ebed7aa3e
clarify disable-room message after banning room
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
5215fbe695
drop redaction calculated hash log to debug_info
...
this is normal redactions. no valid reason this needs to be
warn as it just causes confusion.
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
dc9fe657d5
fix guest accounts being logged still
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
1c7c5bc09c
feat: add /_conduwuit/local_user_count
endpoint
...
only enabled if federation is enabled
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
32161801ed
use/enable let_underscore_must_use
lint
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
71bdcb958a
fix: dont drop remote federation error on 4xx responses
...
for a very long time, if a remote server responded to us with
a valid but unsuccessful (HTTP 4xx) response and the caller was the
`send_federation_request` function, we may find ourselves
with a warning message only containing the destination's
server name which was very unhelpful. the true error was
buried away in trace logs. this would primarily be noticed
with server key fetch requests from us.
conduit has been throwing away the ruma request error: https://gitlab.com/famedly/conduit/-/blame/next/src/utils/error.rs#L62
before: 2024-05-23T04:45:02.930224Z WARN router:{path=/_matrix/client/v3/publicRooms}:handle: conduit_api::client_server::directory: Failed to return our /publicRooms: matrix.org
after: 2024-05-23T05:05:02.435272Z WARN router:{path=/_matrix/client/v3/publicRooms}:handle: conduit_api::client_server::directory: Failed to return our /publicRooms: matrix.org: [401 / M_UNAUTHORIZED] Failed to find any key to satisfy: _FetchKeyRequest(server_name='your.server.name', minimum_valid_until_ts=1716440702337, key_ids=['ed25519:RQB3XPQX'])
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
e098448b9d
init a few vecs in event_handler using with_capacity
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
d49507bc21
media: decomplexify get_all_media_keys for deleting all MXC URIs
...
wow this was terrible, early strawberry code
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
cb73ae3732
add registration token validity endpoint as per matrix 1.2
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
06bec40591
fix: add missing fetch_required_signing_keys for remote send_leave
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
9a7ba94ccf
explicity define unstable support for sliding sync
...
this matrix-react-sdk PR (and the cited sliding sync MSC)
says that they will intend on checking sliding sync support
from this unstable feature flag at /versions until the CORS
header stuff is specced
https://github.com/matrix-org/matrix-react-sdk/pull/12498
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
Jason Volk
2dd5cf8c68
move clap; fix version
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-21 20:22:17 -04:00
Jason Volk
74832bdc47
fix smoke from builds produced by --all-features
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-21 20:22:17 -04:00