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
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
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
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
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
6c1434c165
Hot-Reloading Refactor
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-21 20:22:17 -04:00
Benjamin Lee
9eb0784f6f
don't return extra member count or e2ee device updates from sync
...
Previously, we were returning redundant member count updates or encrypted
device updates from the /sync endpoint in some cases. The extra member
count updates are spec-compliant, but unnecessary, while the extra
encrypted device updates violate the spec.
The refactor necessary to fix this bug is also necessary to support
filtering on state events in sync.
Details:
Joined room incremental sync needs to examine state events for four
purposes:
1. determining whether we need to return an update to room member counts
2. determining the set of left/joined devices for encrypted rooms
(returned in `device_lists`)
3. returning state events to the client (in `rooms.joined.*.state`)
4. tracking which member events we have sent to the client, so they can
be omitted on future requests when lazy-loading is enabled.
The state events that we need to examine for the first two cases is member
events in the delta between `since` and the end of `timeline`. For the
second two cases, we need the delta between `since` and the start of
`timeline`, plus contextual member events for any senders that occur in
`timeline`. The second list is subject to filtering, while the first is
not.
Before this change, we were using the same set of state events that we are
returning to the client (cases 3/4) to do the analysis for cases 1/2.
In a compliant implementation, this would result in us missing some
relevant member events in 1/2 in addition to seeing redundant member
events. In current conduwuit this is not the case because the set of
events that we return to the client is always a superset of the set that
is needed for cases 1/2. This is because we don't support filtering, and
we have an existing bug[1] where we are returning the delta between
`since` and the end of `timeline` rather than the start.
[1]: https://github.com/girlbossceo/conduwuit/issues/361
Fixing this is necessary to implement filtering because otherwise
we would start missing some member events for member count or encrypted
device updates if the relevant member events are rejected by the filter.
This would be much worse than our current behavior.
2024-05-20 20:55:56 -04:00
Benjamin Lee
8bffcfe82b
remove sync response cache
...
This cache can serve invalid responses, and has an extremely low hit
rate.
It serves invalid responses because because it's only keyed off
the `since` parameter, but many of the other request parameters also
affect the response or it's side effects. This will become worse once we
implement filtering, because there will be a wider space of parameters
with different responses. This problem is fixable, but not worth it
because of the low hit rate.
The low hit rate is because normal clients will always issue the next
sync request with `since` set to the `prev_batch` value of the previous
response. The only time we expect to see multiple requests with the same
`since` is when the response is empty, but we don't cache empty
responses.
This was confirmed experimentally by logging cache hits and misses over
15 minutes with a wide variety of clients. This test was run on
matrix.computer.surgery, which has only a few active users, but a
large volume of sync traffic from many rooms. Over the test period, we
had 3 hits and 5309 misses. All hits occurred in the first minute, so I
suspect that they had something to do with client recovery from an
offline state. The clients that were connected during the test are:
- element web
- schildichat web
- iamb
- gomuks
- nheko
- fractal
- fluffychat web
- fluffychat android
- cinny web
- element android
- element X android
Fixes : #336
2024-05-17 18:13:11 -04:00
strawberry
f5864afb52
remove namespace check on username login, code simplification on login route
...
the namespace check on username login is unnecessary, hashes aren't ever
going to match, and axum auth handles this kind of stuff already
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-15 14:31:35 -04:00
strawberry
434b5118cc
media: return our detected MIME type for Content-Type
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-12 15:54:22 -04:00
morguldir
9f19a2025d
Revert "feat(membership): check if user already has the membership that is requested to be set"
...
This reverts commit 321a6ca0fe
.
These checks were not working as intended, resulting in the unban button not working
The join check gets kept since it slightly reduces the amount of sent joins in some cases
This check will probably be replaced soon for a more universal solution to the "made no change" issue
Signed-off-by: morguldir <morguldir@protonmail.com>
2024-05-10 22:52:44 -04:00
strawberry
328502c1cd
dont send avatar url or display name for ban membership events
...
the display name or avatar may be offensive
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-09 17:44:15 -04:00
strawberry
d15e461303
config option to auto-remediate bad users joining bad rooms or servers
...
also forgets all rooms upon leave_all_rooms
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-09 17:44:15 -04:00
strawberry
3504e6e724
fix broken reports
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-09 12:33:46 -04:00
strawberry
154b2ab490
media: additional sanitisation on the Content-Disposition
filename
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-09 09:53:04 -04:00
strawberry
2231ccf118
return inline
Content-Disposition based on the detected file type (e.g. image/video)
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-09 09:53:04 -04:00
strawberry
d4d9f92ade
add security response HTTP headers if not present
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-09 09:53:04 -04:00
strawberry
7b25ef2e6c
make next_batch token a variable in search, revert threads_until change
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-06 03:45:10 -04:00
strawberry
321e197d8c
correct arithmetic adjustments
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-06 03:45:10 -04:00
Xiretza
bbdced9c90
Fix appservice namespace check for room aliases
...
Only normal users should be prevented from creating an alias within an
exclusive namespace, not the appservice itself. This mirrors the
behaviour in api/client_server/room.rs on room creation.
2024-05-06 03:45:10 -04:00
strawberry
0ebb323490
resolve almost all as_conversions lints
...
may need further opinion from others on these
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-06 03:45:10 -04:00
strawberry
f8e1255994
presence: set empty string status msg to None
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-06 03:45:10 -04:00
strawberry
b5c0c30a5e
resolve half of the integer_arithmetic lints, couple misc changes
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-06 03:45:10 -04:00
strawberry
bfb827a418
send Cache-Control and CORS header for remote thumbnail responses
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-05 16:28:21 -04:00
strawberry
e2fb588a8c
sent attachment content-disposition on thumbnails too
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-05 16:28:21 -04:00
strawberry
43c4dfc5df
set content-disposition to attachment instead of inline
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-05 16:28:21 -04:00
strawberry
de26bf22dc
adjust a couple error codes for room alias getting
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
49078aa836
fix: get the presence of the requested user instead of ourselves
...
after getting the shared rooms with the target user, we actually only
get the presence of ourselves instead of the requested user
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
a7f8c848aa
refactor and simplify room creation route a bit
...
removes a couple unnecessary checks, uses our room_id ruma request field
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
0223386243
remove this unnecessary log, use debug_warn
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
a496cc4705
dedupe version getting code, rename to CONDUWUIT_VERSION_EXTRA
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
Charles Hall
a01a7e1219
improve "Leave event has no state" log
...
To include the user, room, and event ID.
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
1464b30433
add workaround for room creation initial_state event content as {}
, slight refactor
...
this will simply skip over the events
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
f4a2b39d55
split up alias.rs a bit (alias checks and room alias server name stuff)
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
e00b65b0e0
use ok_or_else instead of ok_or for backup.rs
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
beeacd4ef1
initialise capabilities with default constructor
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
e5735c81ed
dedupe half of account/room data config.rs code
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
b17ccdadd2
dedupe some code in state.rs
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
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
Matthias Ahouansou
8eda3be9ce
disable federation at the router level too
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-14 22:35:23 -04:00
strawberry
0d21d70d4a
remove two unnecessary matches
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-14 22:35:23 -04:00
strawberry
e5307d44ca
log error for /publicRooms requests, simplify it a bit
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-14 22:35:23 -04:00
Matthias Ahouansou
2d4877f9a5
feat(federation): implement /make_leave and /send_leave
...
also fixed some clippy lints, and added "event_id" field
removal check for room v1 and 2
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-14 22:35:23 -04:00
strawberry
bfa68e7bc5
refactor well-known stuff to use proper ruma types, config types, etc
...
this does deprecate the original `well_known_` prefixed config options
with a dedicated/proper config sub-block (`[config.well_known]`)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-14 22:35:23 -04:00
strawberry
993c0102d9
add unstable support for MSC4125
...
from https://gitlab.com/famedly/conduit/-/merge_requests/626 with code fixes and clippy lint fixes
MSC4125: https://github.com/matrix-org/matrix-spec-proposals/pull/4125
Co-authored-by: Matthias Ahouansou <matthias@ahouansou.cz>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-14 22:35:23 -04:00
Jason Volk
2cc72de80e
fix lossy origin regression 12a8c9badd
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-09 15:26:45 -04:00
strawberry
839a89c968
remove some unnecessary loops
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-09 15:26:45 -04:00
strawberry
40596634c4
respond with actual servers for /_matrix/federation/v1/query/directory
requests instead of just us
...
aka be spec compliant
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-09 15:26:45 -04:00
strawberry
973fed155e
config option to allow/disallow federation profile requests
...
allow_profile_lookup_federation_requests
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-09 15:26:45 -04:00
strawberry
85814e96e3
implement unstable MSC2666 support for querying mutual rooms
...
https://github.com/matrix-org/matrix-spec-proposals/pull/2666
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-09 15:26:45 -04:00
strawberry
9be072181c
remove unneeded url preview function
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-09 15:26:45 -04:00
strawberry
c82c548cbf
bump ruma and cargo.lock
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-09 15:26:45 -04:00
strawberry
39946beda8
add server-side support for /.well-known/matrix/support
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-09 15:26:45 -04:00
Matthias Ahouansou
c946352e7f
fix(sync): send phoney leave event where room state is unknown on invite rejection
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-09 15:26:45 -04:00
Matthias Ahouansou
3b5794b5bd
fix(membership): check if server is in room to decide whether to do remote leaves
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-09 15:26:45 -04:00
Matthias Ahouansou
6078b5ee9d
fixup! feat: support /make_join and /send_join for restricted rooms
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-09 15:26:45 -04:00
strawberry
2516d44cb1
dont 404 and respond+update with default push rules if non-existent
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-05 22:15:16 -04:00
strawberry
e4a987cf80
bump ruma and declare support for unstable MSC3026 (busy presence state)
...
a938640491
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-05 22:15:16 -04:00
strawberry
db8e7e5382
TEMP: remove user_is_invited stuff
...
this is clearly unfinished right now
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-05 22:15:16 -04:00
Matthias Ahouansou
321a6ca0fe
feat(membership): check if user already has the membership that is requested to be set
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-05 22:15:16 -04:00
Jason Volk
ebb71b7d7c
add contains_url filter to /messages; also split out visibility filter.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-05 22:15:16 -04:00
Jason Volk
cde06125b8
immutable cache-control for media
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-05 22:15:16 -04:00
Jason Volk
ca1c77d76b
refactor presence to not involve rooms.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-05 22:15:16 -04:00
Matthias Ahouansou
5c30d2b2b0
fix(membership): perform stricter checks when choosing an authorized user
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-05 22:15:16 -04:00
Matthias Ahouansou
68e64392f0
fix(membership): remove join_authorized_via_users_server field on state update
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-05 22:15:16 -04:00
strawberry
c803891634
better event_type checks for send_state_event_for_key_helper
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-05 22:15:16 -04:00
strawberry
0214caeaea
always allow count
to be filled in search response
...
i fail to see any reason why we would always want
this to be None
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-05 22:15:16 -04:00
strawberry
a2ee6b410e
add another element_hacks feature check
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-05 22:15:16 -04:00
strawberry
ab0182ace4
check if user is allowed to invite for join_authorized_via_users_server
in join_room_by_id_helper
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-05 22:15:16 -04:00
strawberry
ddcf43f1b8
replace ErrorKind::Forbidden
with forbidden()
non-exhaustive constructor
...
917584e0ca
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-05 22:15:16 -04:00
Matthias Ahouansou
49eb418786
feat: support /make_join and /send_join for restricted rooms
...
from https://gitlab.com/famedly/conduit/-/merge_requests/618
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-05 22:15:16 -04:00
Matthias Ahouansou
ed960f41ac
feat: recurse relationships (and fix some lints)
...
from https://gitlab.com/famedly/conduit/-/merge_requests/613
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-05 22:15:16 -04:00
K900
8134dd9151
Reduce number of separate sources of truth for presence disabled-ness
...
Instead of checking if we should update every time we want to update,
call the updater every time and decide internally.
2024-04-03 12:52:46 -04:00
Matthias Ahouansou
c31fb7134a
fix: do not expect that all http requests are valid reqwest requests
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-02 00:32:41 -04:00
Jason Volk
0ba8d1318d
move presence up two levels out of rooms.edus and rooms.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-02 00:32:41 -04:00
Jason Volk
9790477b0e
move typing feature up one level out of rooms.edus.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-02 00:32:41 -04:00
Jason Volk
89a919ce75
move read_receipt feature up one level out of rooms.edus.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-02 00:32:41 -04:00
Jason Volk
3c09313f79
move and reorganize sending codepaths; no functional changes
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-02 00:32:41 -04:00
strawberry
fec4b3c953
delete conduit_bin feature
...
i dont know what's the point of this
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-02 00:32:41 -04:00
strawberry
a0ad911688
stop sending make_join requests after 50 failures
...
this is a very generous number
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-02 00:32:41 -04:00
strawberry
af6c72fa84
stop sending make_join if 15 servers responded with unsupported/invalid room version
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-02 00:32:41 -04:00
Matthias Ahouansou
c61aee4f1c
fix: reject /register requests when there is no token and the type is appservice
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-02 00:32:41 -04:00
strawberry
7a1a271518
dont allow m.call.invite timeline events in public rooms
...
also simplifies the encrypted event check (we dont
need to convert anything here)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-02 00:32:41 -04:00
strawberry
ff3bc3fb09
on new room creations: only allow moderators to call public rooms
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-02 00:32:41 -04:00
strawberry
72b60c4770
add lockdown_public_room_directory config option
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-02 00:32:41 -04:00
Jason Volk
18c34434bc
add outgoing federation typing and conf items
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-03-30 22:06:18 -04:00
Jason Volk
4becbed2a7
refactor sending interface stack
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-03-30 22:06:18 -04:00
Jason Volk
f956e8c3b5
move and deduplicate read receipt flusher.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-03-30 22:06:18 -04:00
strawberry
b36c397702
mark msc2285 (private read receipts) as supported
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
60623cd14b
dont return bad_config for private room directory requests
...
this would log as an error and as HTTP 500
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
47889410eb
use CONDUIT_VERSION_EXTRA in endpoints
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
cf8727a5f8
only test long_file_names_works if using sha256_media feature
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
98e480ddcd
revert checking appserice destination against ip_range_denylist
...
this is the url field in the appservice registration file,
this is almost always localhost and the admin should
be vetting the appservice registration yaml file before
registering it anyways.
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
8915b6469d
forbid admin room from being made public
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
48d1a3af3c
resolve the last few relevant pedantic clippy lints
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
fa71dd4b4c
use body.dir for relations now
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
92dbe82675
remove unnecessary clone from into_iter
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
6aaf169c45
fix wrong order of logic, prefer room alias server first if available
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
e9793868ec
add recursion_depth None for now
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
567b24e410
add /_conduwuit/server_version
route
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
Jason Volk
cb12f285e9
improve incoming http request and other logging
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-03-26 22:24:24 -04:00
strawberry
868976a149
use chain_width 60
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
Jason Volk
f5da75e476
split structs from service/globals/mod.rs into separate units
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-03-26 22:24:24 -04:00
strawberry
24faf4dd26
revert 0297cfe307
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
3f9825788e
check URL preview requests against ip_range_denylist
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
4be37fbe8d
only remove event_id field in room v1 and v2
...
no this doesnt make those rooms work,
just a why not thing
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
0863bec098
allow non-joined users to get aliases of world_readable rooms
...
`user_can_see_state_events` checks if user is joined,
or if room visibility is world_readable
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
32ab88e68a
check the URL and response remote address for ip_range_denylist
...
the previous only checked the server_name
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
fbefbd57be
implement include_state
search criteria
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
c2e89b939c
add element web search count hack (?)
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
f4146de17d
add feature for smElement client hacks
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
7bd56765ef
fix some more pedantic clippy lints
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
27d6ce3cc5
log path parameters when try http request fails
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-23 01:49:27 -04:00
strawberry
7fbbdf83ab
forgot to fix these ones too
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-23 01:49:27 -04:00
strawberry
3bc2af7d26
resolve and add even more pedantic clippy lints
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-23 01:49:27 -04:00
strawberry
0bb5115bd1
resolve clippy match_bool
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-23 01:49:27 -04:00
strawberry
9d0b647911
resolve couple pedantic clippy lints, remove unnecessary qualifications
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-23 01:49:27 -04:00
Matthias Ahouansou
60f2471f59
refactor appservice type stuff
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-23 01:49:27 -04:00
Jason Volk
9334f938ae
refactor reqwest client suite w/ conf items.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-03-23 01:49:27 -04:00
Jason Volk
61b1d6d869
add corks to coalesce writes for several heavy calltrees.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-03-23 01:49:27 -04:00
strawberry
1e07f417ba
raise get_keys_helper timeout even more
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-23 01:49:27 -04:00
strawberry
9715b07b38
skip rooms we have not joined before for auto-join
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-23 01:49:27 -04:00
strawberry
3e902836cc
simplify heroes get_avatar
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-23 01:49:27 -04:00
strawberry
7066b7b428
feat: automatically join rooms on registration
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-23 01:49:27 -04:00
strawberry
10e2eb5e08
bump rocksdb, deps, switch to hickory dns/resolver
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-23 01:49:27 -04:00
strawberry
61f49ecf0e
rename forbidden_room_names to forbidden_alias_names
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-19 00:17:41 -04:00
strawberry
5e880ac44a
declare various missing server capabilities
...
this should fix FluffyChat password resets, and
other possible client issues that expose features
based on server capabilities.
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-19 00:17:41 -04:00
strawberry
7f7bd91e8a
add comment for future org.matrix.msc2285.stable
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-19 00:17:41 -04:00
strawberry
2be43d3712
fix failing to register new appservice accounts
...
this is such a terribly named enum field.
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-19 00:17:41 -04:00
strawberry
0301c7c083
fix Appservice AccessTokenOptional authentication type endpoints
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-19 00:17:41 -04:00
strawberry
a7966b8f05
config option to allow incoming remote read receipts
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-19 00:17:41 -04:00
Jason Volk
abceae26de
add flush suite to sending service; trigger on read receipts.
...
Signed-off-by: Jason Volk <jason@zemos.net>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-19 00:17:41 -04:00
Jason Volk
95ea665649
complete federation destination caching preempting getaddrinfo(3).
...
fixed some clippy lints and spacing adjusted
Signed-off-by: Jason Volk <jason@zemos.net>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-19 00:17:41 -04:00
strawberry
16572a868a
slight inclusive wording changes
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-19 00:17:41 -04:00
strawberry
b079b94715
track media uploads by user
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-19 00:17:41 -04:00
Matthias Ahouansou
e7c6b8c91b
feat(spaces): hierarchy over federation
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-19 00:17:41 -04:00
Matthias Ahouansou
4c841cd909
refactor: check if federation is disabled inside the authcheck where possible
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-19 00:17:41 -04:00
Matthias Ahouansou
c48535ef32
fix: avoid panics when admin room is not available
...
Co-authored-by: strawberry <strawberry@puppygock.gay>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-19 00:17:41 -04:00
strawberry
de8f773620
slight wording updates
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-19 00:17:41 -04:00
strawberry
8d8467a4ea
add legacy v1 routes for the remaining media endpoints
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-16 00:09:48 -04:00
strawberry
8cc23671e0
treat non-appservice registrations as None auth
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-16 00:09:48 -04:00
strawberry
8e3b9a3d17
Revert "switch to hickory-dns / hickory_resolver"
...
This reverts commit 2ea524bfab
.
2024-03-16 00:09:48 -04:00
strawberry
b0bee8f6ae
drop sync requests to debug
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-16 00:09:48 -04:00
strawberry
690928ec81
(hopefully?) implement AuthScheme::AppserviceToken
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-16 00:09:48 -04:00
strawberry
ad8d1dc68a
silence unused_qualification clippys warning due to async traits
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-16 00:09:48 -04:00
strawberry
9dc4290438
split GetPdu and GetRemotePdu, handle response as incoming PDU
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-16 00:09:48 -04:00
Timo Kösters
6f77f7ee9e
dont leak users in room directory if sender is not allowed to see them
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-16 00:09:48 -04:00
strawberry
6df7f976db
log sync sender_user
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-16 00:09:48 -04:00
strawberry
5454b653fe
switch to hickory-dns / hickory_resolver
...
trust-dns rebranded to hickry-dns
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-16 00:09:48 -04:00
strawberry
e888a0a745
drop dead server log spam to debug
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-10 13:03:28 -04:00
strawberry
958b738e5a
drop querying _matrix SRV record to debug
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-10 13:03:28 -04:00
strawberry
1a40171bc1
log warning for failed preview gen, better error message
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-08 18:09:41 -05:00
strawberry
1911f5a8fa
fix cargo doc lint
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-08 12:51:21 -05:00
strawberry
c58f93105a
implement legacy "v1" media request routes
...
if https://github.com/ruma/ruma/issues/1240 is to
be trusted, there are apparently still servers
and clients that may call these endpoints.
i'm unable to read the history of that matrix.to
link so i don't know the full context, but this
is trivial to implement so..
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-08 12:51:21 -05:00
strawberry
496a9c7af8
resolve some pedantic lints, reduce some allocations
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-08 12:51:21 -05:00
Matthias Ahouansou
5ab76a1332
update ruma appservice Registration type MR
...
from https://gitlab.com/famedly/conduit/-/merge_requests/583
and fixed panic from blocking async call in timeline/mod.rs
Co-authored-by: strawberry <strawberry@puppygock.gay>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-08 12:51:21 -05:00
Timo Kösters
019a82850d
improvement: do not save typing edus in db
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-08 12:51:21 -05:00
strawberry
7c1624931d
remove various unnecessary qualifications
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-08 12:51:21 -05:00
strawberry
aedb5966fe
resolve nightly performance assigning_clones lint
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-08 12:51:21 -05:00
strawberry
4dfd5a7c15
add AuthScheme AccessTokenOptional in ruma_wrapper
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-08 12:51:21 -05:00
Matthias Ahouansou
4ec2d3ecb5
refactor: use async-aware RwLocks and Mutexes where possible
...
squashed from https://gitlab.com/famedly/conduit/-/merge_requests/595
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-08 12:51:21 -05:00
strawberry
f419c64aca
add rustfmt.toml, format entire codebase
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-08 12:51:21 -05:00
strawberry
9251727d57
return proper error if fail fetching and dont have profile
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-08 12:51:21 -05:00
strawberry
465533d32b
attempt keeping track/cache remote profiles locally again
...
also fixes logic error where we always say
we couldnt find the profile
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-08 12:51:21 -05:00
strawberry
608aa83ed2
check if invited user is an admin before rejecting instead
...
i think this makes more sense tbh than what synapse does
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-03 22:20:37 -05:00
strawberry
34e8fd38cf
extend room banning to local+remote room invites
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-03 22:20:37 -05:00
strawberry
ea66bff46b
config option to block non-admin room invites
...
works just like block_non_admin_invites from synapse
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-03 22:20:37 -05:00
strawberry
e2c7afe69c
go through a ton of pedantic clippy lints
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-03 22:20:37 -05:00
strawberry
cde6fdd741
resolve or_fun_call clippy lint
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-03 22:20:37 -05:00
strawberry
d5bfef18a4
fix 1.77 clippy warning (multiple_bound_locations)
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-03 22:20:37 -05:00
sininenkissa
e71855cd0b
make conduwuit show up as the server software name on /_matrix/federation/v1/version ( #186 )
...
conduwuit > /_matrix/federation/v1/version
Co-authored-by: June <june@girlboss.ceo>
2024-03-01 19:29:21 -05:00
Timo Kösters
f0ae99125a
fix: avoid panic when client is confused about rooms
2024-02-28 13:56:19 -05:00
Timo Kösters
8e0f7b0d0a
Avoid federation when it is not necessary
2024-02-28 13:56:19 -05:00
strawberry
24625e9659
resolve nightly rust warnings
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-26 00:40:15 -05:00
strawberry
ca42ec338b
replace accidental unwraps with if let's
...
this provides not only some future compatibility with MSC4051,
but it just makes sense to not crash/error if we can't get a server_name
from the room ID and should just use the server_name from the sender
user's invite event. there is already code ahead that accounts for
an empty vector so this is safe.
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-24 13:04:13 -05:00
strawberry
1ecad225be
feat: custom text for user displayname suffix upon registration
...
replaces the lightning bolt emoji option with support for
your own text or emojis
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-24 13:04:13 -05:00
strawberry
c9364dc077
dont evict admins from room, allow admins to join banned rooms
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
strawberry
ed0c8e86f7
initial implementation of banning room IDs
...
takes a full room ID, evicts all our users from that room,
adds room ID to banned room IDs metadata db table, and
forbids any new local users from attempting to join it.
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
strawberry
a92f291bbf
feat: query param to return full state event or event content
...
query parameter `?format=event|content`
defaults to normal behaviour which is the event's content.
ruma impl: 788ea6b00f
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
strawberry
a0205cd41d
implement deprecated user field for login requests
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
strawberry
0ea8657070
default to Undefined if room avatar URL was not found despite checking if its Some
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry
244c1f7190
config option to check root domain with URL previews
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry
48e4b71dd1
remove hardcoded 300kb limit on spider size with config option of 1MB default
...
modern websites are sadly massive, 300kb is pretty low. 1MB should be enough.
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry
2ea895199a
dont drop true error with url str parse, fix url contains logic order, clarify config comment
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry
8e6d52e7dd
dont follow more than 2 redirects for URL previews for security reasons
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
Reiner Herrmann
c0dd5b1cc2
feat: URL preview support
...
from upstream MR https://gitlab.com/famedly/conduit/-/merge_requests/347
with the following changes (so far):
- remove hardcoded list of allowed hosts (strongly disagree with this,
even if it is desired, it should not be harcoded)
- add more allow config options for granularity via URL contains,
host contains, and domain is (explicit match) for security
- warn if a user is allowing all URLs to be previewed for security reasons
- replace an expect with proper error handling
- bump webpage to 2.0
- improved code style a tad
Co-authored-by: rooot <hey@rooot.gay>
Signed-off-by: rooot <hey@rooot.gay>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry
6f26be1c6e
eat less /ban endpoint fields, fix ban reason not consistently applied
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry
d4d8c6eb21
check if custom room ID is apart of forbidden room alias
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
Matthias Ahouansou
fc93b29abe
feat: forbid certain usernames & room aliases
...
squashed from https://gitlab.com/famedly/conduit/-/merge_requests/582
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
Matthias Ahouansou
784d307425
revamp appservice registration to ruma's Registration type
...
squashed from https://gitlab.com/famedly/conduit/-/merge_requests/583
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00