Jason Volk
c1712d4d8b
optimize increment
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-30 18:01:20 +00:00
Jason Volk
3480074f61
sha256_media integration
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-30 18:01:20 +00:00
Jason Volk
efbdced535
cleanup migration function a bit
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-30 18:01:20 +00:00
Paul Robertson
19d8f0b27e
dont use any for a single feature check
2024-06-30 10:40:54 -04:00
Paul Robertson
73b85372d6
drop parking_lot feature
2024-06-29 11:20:48 -04:00
Paul Robertson
5e6b9ec1cf
drop thread_local feature
2024-06-29 11:20:48 -04:00
Paul Robertson
65177d237a
drop the sqlite feature from core
2024-06-29 11:20:48 -04:00
Paul Robertson
325f1c0bd2
drop the sqlite feature from database
2024-06-29 11:20:45 -04:00
Paul Robertson
68f1b4789a
drop the sqlite feature from main
2024-06-29 11:05:33 -04:00
Paul Robertson
624cd2acfa
remove sqlite code
2024-06-29 11:05:33 -04:00
Jason Volk
d875e0c1c0
fix handling of empty admin command lines
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-23 09:52:16 -04:00
Jason Volk
2dae3052e2
remove unnecessary html render
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-22 21:22:56 +00:00
Jason Volk
2f84bc895d
Improve additional command outputs containing codeblocks.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-22 21:22:56 +00:00
Jason Volk
3b34e72456
improve output scheme for admin query commands
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-22 21:22:56 +00:00
Jason Volk
7eee88160a
truncate other span names and fields
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-22 21:22:56 +00:00
strawberry
5f46623371
redaction fixes
2024-06-22 21:22:56 +00:00
Jason Volk
14dcc8db15
truncate MatchedPath for span field
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-18 10:56:19 +00:00
Jason Volk
213a6d441f
shorten several request span names.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-18 10:56:19 +00:00
Jason Volk
98d96b89a5
minor reductions
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-18 10:56:19 +00:00
Jason Volk
1c0ed91f6f
rename ruma_wrapper to router
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-17 05:04:00 +00:00
Jason Volk
64705fa27d
rename router to routes
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-17 05:04:00 +00:00
Jason Volk
8affdc43a6
additional termimad config
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-17 02:10:27 +00:00
Jason Volk
1ccdba8921
use markdown for list-database-files command
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-17 02:10:27 +00:00
Jason Volk
50ce87161b
refactor admin command visibilities and use statements
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-17 02:10:27 +00:00
Jason Volk
c6f4b20e17
add server restart support w/ admin command
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-17 02:10:27 +00:00
Jason Volk
2cb31275f0
fix missing command response; use non-empty command responses
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-17 02:10:27 +00:00
Jason Volk
5aee03d14a
switch to crate rustyline_async
...
improve console signal and interrupt stack
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-17 02:10:27 +00:00
Jason Volk
959fd2e6c4
split main signal handler to unit
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-17 02:10:27 +00:00
strawberry
9e9b256b83
temp: comment out hardened_malloc code
...
sorry but this is just non-functional in our build system,
i haven't had time to figure out why nix doesn't like what
i'm doing with it, and i haven't heard anyone using this
(the user who i anticipated would use this has not updated
their conduwuit in many months)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-16 15:20:57 -04:00
Jason Volk
a22524496d
console command interruption
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-16 08:02:14 +00:00
Jason Volk
1d1b1644e9
add admin debug echo command
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-16 08:02:14 +00:00
Jason Volk
483f0a9c86
add admin command for admin room notices
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-16 08:02:14 +00:00
Jason Volk
3d3d63fdf4
admin commands for shutdown/reload
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-16 07:24:51 +00:00
Jason Volk
08f2b8579c
abstract shutdown/reload functionality.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-16 07:24:51 +00:00
Jason Volk
30e7298dd7
fix doc-lazy-continuation
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-16 07:24:51 +00:00
Jason Volk
3872ae80f7
fix PanicInfo deprecation
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-16 07:24:51 +00:00
Jason Volk
0923b6f428
fix use std::mem related lint
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-16 07:24:51 +00:00
Jason Volk
48d9677959
rustfmt nightly/stable compats
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-16 03:07:59 +00:00
Jason Volk
02bd67dc4b
admin command path simplifications; fix message to room
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-16 03:07:59 +00:00
Jason Volk
3813628acd
log full custom edu rather than just content
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-16 03:07:59 +00:00
strawberry
03c04ce0a1
dont allow "remote admins" to run public escaped cmds on behalf of others
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-14 23:46:07 -04:00
Jason Volk
08bf074cbb
reduce roomid_mutex_state
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-14 22:09:55 +00:00
Jason Volk
539aa27815
reduce roomid_mutex_federation
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-14 22:09:55 +00:00
Jason Volk
22272bdc16
reduce roomid_mutex_insert
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-14 22:09:55 +00:00
Jason Volk
8b68d6306c
add MutexMap to utils
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-14 22:09:55 +00:00
Jason Volk
d4775f0763
add server-side command escape w/ public echo for admins
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-14 06:40:47 +00:00
Jason Volk
571ab6ac2b
admin terminal console
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-13 03:33:24 +00:00
Jason Volk
5df7443437
add log suppression tool
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-13 02:16:46 +00:00
Jason Volk
e76e604771
add MxidError to our Error
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-12 21:06:09 +00:00
Jason Volk
1f9225e4d1
add markdown log format for capture
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-12 21:06:09 +00:00
Jason Volk
c914a4fd91
capture logs for resolve-true-destination admin cmd
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-12 18:52:39 +00:00
Jason Volk
aa34021b27
tracing capture interface
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-12 18:25:27 +00:00
Jason Volk
1bb4021b90
add format util to log suite
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-12 18:25:27 +00:00
Jason Volk
877c04de52
add color utils to log suite
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-12 18:25:27 +00:00
Jason Volk
029e1c630a
split core log into directory
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-12 18:25:27 +00:00
Jason Volk
39110ebc3c
add fmt::Error as core Error source
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-12 18:25:27 +00:00
Jason Volk
2ab3231ea6
add tracing_subscriber::filter::ParseError to amalgam
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-12 18:25:27 +00:00
strawberry
d0069cc100
log out any sessions when the server emergency password is unset
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-12 14:04:47 -04:00
Matthias Ahouansou
556e78214a
fix: only allow the server user to set the admin alias
...
Should make it safer to move the alias if the admin room broke on a public server.
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-12 14:04:47 -04:00
strawberry
8fff7ea706
cleanup+refactor admin room alias and server account accessing to globals
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-12 14:04:47 -04:00
Matthias Ahouansou
f712c0cefb
fix: restrict who can remove aliases
...
Previously, anyone could remove any local alias, meaning that someone could re-route a popular alias elsewhere
Now, only the creator of the alias, users who can set canonical aliases for the room, server admins and the server user can delete aliases
added some additional changes/fixes to adapt to our codebase
Co-authored-by: strawberry <strawberry@puppygock.gay>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-12 14:04:47 -04:00
Matthias Ahouansou
26d103d314
fix: only process admin commands if server user is in the room
...
Should prevent some edge cases with a misconfigured admin room
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-12 14:04:47 -04:00
Benjamin Lee
0688a96c37
drop redacted events from search results
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-12 14:04:47 -04:00
Benjamin Lee
eb73d8c669
fix: de-index pdus when redacted
...
bit of code dedupe as well
Co-authored-by: strawberry <strawberry@puppygock.gay>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-12 14:04:47 -04:00
Benjamin Lee
20a54aacd6
factor search tokenization out into a function
...
This ensures that the tokenization algorithm will remain in sync between
querying, indexing, and deindexing. The existing code had slightly
different behavior for querying, because it did not discard words with
>50 bytes. This was inconsequential, because >50 byte tokens are never
present in the index.
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-12 14:04:47 -04:00
Benjamin Lee
81cd677b4e
fix dropped events in search
...
The previous code would drop some events entirely if any events between
`skip` and `skip + limit` were not visible to the user. This would cause
the set of events skipped by the `skip(skip)` method to extend past
`skip` in the raw result set, because `skip(skip)` was being called
*after* filtering out invisible events.
This bug will become much more severe with a full filtering
implementation, because it will be more likely for events to be filtered
out. Currently, it is only possible to trigger with rooms that have
history visibility set to "invited" or "joined".
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-12 14:04:47 -04:00
Benjamin Lee
73da353e52
fix missing next_batch for search
...
The previous code would fail to return next_batch if any of the events
in the window were not visible to the user. It would also return an
unnecessary next_batch when no more results are available if the total
number of results is exactly `skip + limit`.
This bug will become much more severe with a full filtering
implementation, because we will be more likely to trigger it by
filtering out events in a search call. Currently, it is only possible to
trigger with rooms that have history visibility set to "invited" or
"joined".
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-12 14:04:47 -04:00
strawberry
01a77f8a71
add replaces_state
and prev_sender
in unsigned
for membership changes
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-11 13:03:32 -04:00
strawberry
ea03a50e21
remove pfps/avatars and display names upon deactivation
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-11 01:19:18 -04:00
strawberry
25d44cad31
slightly dedupe pfp/displayname updates, update blurhash in PDUs too
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-11 01:19:18 -04:00
strawberry
91519959ed
mark account as deactivated before leaving rooms
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-11 01:19:18 -04:00
strawberry
305dfc3b42
adminroom: cmds to view room topic and room members
...
this will be extended more
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 23:38:03 -04:00
strawberry
65fbb80145
adminroom: leave all rooms by default on manual deactivations
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 21:14:18 -04:00
strawberry
f1d90e5df6
log client/remote IP address on various routes tracing calls
...
this uses InsecureClientIp as this is purely for informational
and logging purposes
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 21:04:51 -04:00
strawberry
74b29ce067
adminroom: improved room list outputs, add counts
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 19:45:04 -04:00
strawberry
0e7c3cb338
adminroom: simplify codeblock checks
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 19:45:04 -04:00
strawberry
14a3471fcb
adminroom: fix function typo
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 19:45:04 -04:00
strawberry
c834e86e67
adminroom: user cmds to put/get/delete room account data
...
primarily useful for inserting `m.server_notice` user account data
onto the admin room
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 19:45:04 -04:00
strawberry
b4f0a8a8b5
adminroom: clean up and optimise user commands
...
`deactivate-all` was terrible and incredibly inefficient
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 19:45:04 -04:00
strawberry
9bb90213e1
adminroom: add user ID parsing utils
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 19:45:04 -04:00
strawberry
fcdf1463ef
refactor get_room_topic
into 1 single function
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 19:45:04 -04:00
strawberry
88d038ffec
refactor getting room's canonical alias into 1 function
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 19:45:04 -04:00
strawberry
4b4c0952a2
refactor guest_can_join
into 1 single function
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 19:45:04 -04:00
strawberry
016270b33b
adminroom: add server_in_room state cache accessor
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 19:45:04 -04:00
strawberry
d2063013b4
adminroom: add various state_cache db accessors
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 19:45:04 -04:00
strawberry
03ba9bde29
admin cmd to force download and use a server's room state
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 19:45:04 -04:00
strawberry
1287a86c05
client-api: export validate_and_add_event_id
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 19:45:04 -04:00
strawberry
8210e8c42e
slightly adjust sliding sync code for ruma bump
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 17:20:59 -04:00
strawberry
cb03654dc1
fix broken federated room invites/joins
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-10 14:53:26 -04:00
Jason Volk
f0557e3303
split migrations function
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-09 20:56:41 +00:00
Jason Volk
f52acd9cdf
Fix idiomatic let if
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-09 20:06:50 +00:00
Jason Volk
eae41fc411
Fix use-self
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-09 20:06:50 +00:00
Jason Volk
c3c91e9d80
Fix suboptimal flops
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-09 20:06:50 +00:00
Jason Volk
a8de5d1e60
Fix futures not Send
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-09 20:06:50 +00:00
Jason Volk
7688d67870
Fix needless pass by ref mut
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-09 20:06:50 +00:00
Jason Volk
89d7d48324
Fix equatable if let
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-09 20:06:50 +00:00
Jason Volk
b525031a25
Fix derive partial eq without eq
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-09 20:06:50 +00:00
Jason Volk
67f4285504
Fix branches sharing code
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-09 20:06:50 +00:00
Jason Volk
b65f05ce19
simplify lifetime parameters
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-09 20:06:50 +00:00
Jason Volk
db2c9f28b6
split admin room moderation commands
...
prior stack frame allocated 170 KiB
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-09 20:06:50 +00:00
Jason Volk
fc1b8326e6
split join_room_by_id_helper into local and remote
...
prior stack frame allocated 180 KiB
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-09 20:06:50 +00:00
Jason Volk
6e50b07bf5
Fix large future
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-09 20:06:50 +00:00
strawberry
ccf9f95cc9
retroactively fix bad data in roomuserid_joined
, remove pointless prefix scans
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-09 03:55:04 -04:00
strawberry
0524e6ed52
remove unnecessary active_local_joined_users_in_room
state_cache accessor
...
the underlying bug has been fixed
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-08 17:32:04 -04:00
strawberry
7f5b59afbb
add conduwuit-specific db migration fixing double split db entries
...
for a few months now we accidentally had double 0xFF splits being
inserted into `roomuserid_joined` cf when membership counts and such
are being updated.
this is a conduwuit-specific db migration and does NOT break conduit
compatibility.
`fix_bad_double_separator_in_state_cache`
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-08 16:58:24 -04:00
strawberry
ab5db37851
fix bad double split insert on roomuserid_joined
cf
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-08 16:57:48 -04:00
strawberry
c0c7f23a05
services(timeline): use self
instead of services()
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-07 15:10:00 -04:00
strawberry
14ec41c211
services(state_cache): use self
instead of services()
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-07 15:10:00 -04:00
strawberry
2230bc7339
services(state): use self
instead of services()
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-07 15:10:00 -04:00
strawberry
0ebabba971
services(pdu_metadata): use self
instead of services()
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-07 15:10:00 -04:00
strawberry
3ed561cb31
service(globals): use self
instead of services()
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-07 15:10:00 -04:00
strawberry
a061644b2d
service(event_handler): use self
instead of services()
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-07 15:10:00 -04:00
strawberry
82ac6b01b2
service(auth_chain): use self
instead of services()
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-07 15:10:00 -04:00
strawberry
a04ff7d4af
fix(fed): dont reject /state_ids/
on world readable rooms
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-07 15:10:00 -04:00
strawberry
10dfbf6420
fix(fed): dont reject /state/
on world readable rooms
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-07 15:10:00 -04:00
strawberry
d10bc67c9d
fix(fed): dont reject /event_auth/
on world readable rooms
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-07 15:10:00 -04:00
strawberry
197a02bf8d
fix(fed): dont reject /event/
on world readable rooms
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-07 15:10:00 -04:00
strawberry
8103bd7310
fix(fed): dont reject /backfill/
on world readable rooms
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-07 15:10:00 -04:00
strawberry
81487e3f07
fix(fed): dont reject /get_missing_events
on world readable rooms
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-07 15:10:00 -04:00
strawberry
bfbb29dded
add is_world_readable
state_accessor func, use self
instead of services()
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-07 15:10:00 -04:00
strawberry
1cc7cf54a7
add config option to allow guests to access TURN server
...
`turn_allow_guests`
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-07 15:09:59 -04:00
Lux Aliaga
176d95c2a8
admin: media: Force flag on past media removal
...
When enabled, if a file is deemed unremovable, it skips past it and
continues deleting all other files that fit the criteria. Additionally,
fix age comparison under the same command.
Signed-off-by: Lux Aliaga <lux@nixgoat.me>
2024-06-07 15:08:08 -04:00
Jason Volk
3ada847570
extract client ip from connection state
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-07 02:00:28 +00:00
Jason Volk
0bade5317f
add connection info to router
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-07 02:00:28 +00:00
Jason Volk
c2267d4c03
add services state to router
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-07 02:00:28 +00:00
Jason Volk
aebae11c82
reintroduce the variadic macro for ruma handler.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-07 02:00:28 +00:00
Jason Volk
f871d8fd4e
move impl FromRequest for Ruma up one level; some cleanup
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-07 02:00:28 +00:00
Jason Volk
4a68e28c71
use debug_warn for presence spam
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-07 02:00:28 +00:00
Jason Volk
6e59135a7d
eliminate RotationHandler
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-07 02:00:28 +00:00
Jason Volk
0e74ade7d7
isolate axum shutdown in router; minor run-cycle/signalling tweaks
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-07 02:00:28 +00:00
Jason Volk
e4aa20ebeb
move services ctor/dtor detail into service
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-06 18:21:40 +00:00
Jason Volk
427aa4645c
cleanup/reduce some tracing spans.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-06 18:21:40 +00:00
Jason Volk
73718a1208
elminate generic argument in ruma_wrapper::auth
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-06 18:21:40 +00:00
Jason Volk
0e3d192ad2
fix trivial-casts
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-06 18:21:40 +00:00
Jason Volk
9bb52cb3ec
add missing dev_release_log_level feature projection
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-06 18:21:40 +00:00
Jason Volk
dd49b3c3a1
fix/simplify emergency access initialization
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-06 18:21:40 +00:00
Jason Volk
f32380772f
rename api::client_server to api::client
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-06 18:21:40 +00:00
strawberry
8428f43c78
add legacy element hack for UIAA using invalid user
field
...
see:
- e9302a9556
- https://github.com/element-hq/element-android/issues/8043
- https://github.com/element-hq/element-ios/issues/7405
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-06 10:57:00 -04:00
Jason Volk
3af153f5ae
split s2s into units
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-06 04:41:27 -04:00
strawberry
38238c309f
appservices: remove unnecessary services()
call for self
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-05 18:18:08 -04:00
strawberry
0857fe7907
abstract+add more "users in room" accessors, check membership state on active_local_joined_users_in_room
...
`roomuserid_joined` cf seems unreliable, so in the mean time we need to check
membership state (or maybe this is a more reliable check anyways)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-05 18:18:08 -04:00
strawberry
c738c119f8
delete unnecessary real_users_cache
, fix overwriting push_target iter, add proper function for getting local active users in room
...
this `real_users_cache` cache seems weird, and i have no idea what
prompted its creation upstream. perhaps they did this because
sqlite was very slow and their rocksdb setup is very poor, so
a "solution" was to stick member counts in memory.
slow iterators, scanning, etc do not apply to conduwuit where
our rocksdb is extremely tuned, and i seriously doubt something
like this would have any real world net-positive performance impact.
also for some reason, there is suspicious logic where we
overwrite the entire push target collection.
both of these things could be a potential cause for receiving
notifications in rooms we've left.
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-05 18:18:08 -04:00
strawberry
bf10ff65a4
media: ignore Content-Type params, use binary_search
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-05 17:28:51 -04:00
strawberry
b781771a9b
media: drop Content-Type detection support
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-05 16:33:53 -04:00
strawberry
df8ba04e31
media: trust client Content-Type again
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-05 16:33:53 -04:00
strawberry
19926ba00d
sort ALLOWED_INLINE_CONTENT_TYPES
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-05 16:33:53 -04:00
strawberry
893cc50570
csp: set form-action 'none'
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-05 16:33:53 -04:00
strawberry
c9fbbdce1c
csp: remove unusual directives, slight security improvement
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-05 02:50:44 -04:00
Jason Volk
732e8b82aa
Abstract password hashing into util.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-05 03:00:23 +00:00
strawberry
919735b4ce
remove usages of &String
and &Owned[..]
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-03 14:17:42 -04:00
strawberry
2e83e56a07
remove deleted config options and update address
example option
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-03 14:17:42 -04:00
strawberry
ff7dfec74c
slightly cleanup update check
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-03 14:17:42 -04:00
strawberry
84290bd668
update deps, remove unnecessary zstd crate, pin rust-rocksdb rev
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-03 14:17:32 -04:00
strawberry
b29a8791de
admincmd: leave all rooms if deactivating all users with --force
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-03 00:10:28 -04:00
strawberry
83220b43a2
use saturating_add and vec with_capacity in even more places
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-03 00:10:28 -04:00
strawberry
f6fa2a4f65
use swap_remove
instead of remove
in a few places
...
`swap_remove` is faster if we don't care about the order (O(1))
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-03 00:10:28 -04:00
strawberry
9a5f1dac57
drop unnecessarily verbose get_alias_helper logging
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-03 00:10:28 -04:00
strawberry
173ff26eb6
disable URL previews by default upon admin room creation
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-03 00:10:28 -04:00
strawberry
45e3fdba69
admin room: add get-latest-pdu
and get-first-pdu
commands
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-03 00:10:24 -04:00
strawberry
9f359e0550
make resolve_state
public to resolve new forced compressed room state
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-02 23:53:31 -04:00
strawberry
ffdf47d1ea
add latest_pdu_in_room
timeline function
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-02 23:53:31 -04:00
strawberry
1af65e695d
media: return application/octet-stream if no content-type was provided
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-02 23:53:31 -04:00
strawberry
b1886583d9
csp: fix typo, add base-uri none
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-02 23:53:31 -04:00
strawberry
f11103b43b
media: check detected content-type against MSC2702
...
only return `inline` if the detected content-type is an allowed
inline content-type as defined by MSC2702
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-02 23:53:31 -04:00
strawberry
9b096cc67b
fix: check if you've left the room before forgetting it
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-02 23:53:31 -04:00
strawberry
1ac72ab914
init a few state hashmaps using with_capacity
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-02 23:53:31 -04:00
strawberry
f0533e07ef
fed: remove unnecessary mutables, use with_capacity in couple more places
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-02 23:53:31 -04:00
strawberry
68f42f5a2f
fed: relax read receipt EDU check
...
so in theory: guest users, peaking over federation,
and world readable rooms should be allowed to send
read receipts even if they're not joined.
relaxing this check to only allow the read receipt if
the server has at least 1 member in the room makes
some of this still work
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-02 23:53:31 -04:00
strawberry
4aead5de7a
reflax a couple restrictions on custom room IDs and aliases
...
🙃
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-02 23:53:31 -04:00
Jason Volk
1a4736d40b
support configuring multiple bind hosts; default to dual localhost.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-03 01:17:58 +00:00
Jason Volk
887496d040
consolidate default cargo features
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 23:01:12 +00:00
Jason Volk
c2586737ae
accept receipts prior to events
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 23:01:12 +00:00
Jason Volk
7d2f510cc3
single-source for defaulty log filter string
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 23:01:12 +00:00
Jason Volk
102bd1b4a6
use debug_warn for parse_incoming_pdu err results.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 23:01:12 +00:00
Jason Volk
89ab687f16
move signal handling out to main
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 23:01:12 +00:00
Jason Volk
1108235c63
misc simplifications and cleanup
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 20:17:45 +00:00
Jason Volk
90d9a997a5
split / cleanup core utils.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 20:17:45 +00:00
Jason Volk
5fe5ab279c
split RouterExt impl related into ruma_wrapper unit.
...
slightly restrict client_server mod index.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 20:17:45 +00:00
Jason Volk
f1d1366129
split resolve_actual_dest
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 20:17:45 +00:00
Jason Volk
ba48758b89
impl fmt::Display for FedDest
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 20:17:45 +00:00
Jason Volk
9df5265c00
split sending resolver into unit.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 20:17:45 +00:00
Jason Volk
53fe2362fc
Fix path-buf-push-overwrite
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 12:34:05 -04:00
Jason Volk
38ab1083e3
Fix ptr-cast-constness
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 12:34:05 -04:00
Jason Volk
050841a871
Fix inefficient-to-string
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 12:34:05 -04:00
Jason Volk
4521e93d04
Fix stable-sort-primitive
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 12:34:05 -04:00
Jason Volk
0f3d43153b
Fix unused-self
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 12:34:05 -04:00
Jason Volk
e5eccb3a0c
Fix unreadable-literal
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 12:34:05 -04:00
Jason Volk
68cbf19154
Fix items-after-statements
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 12:34:05 -04:00
Jason Volk
2ab427fe99
Fix default-trait-access
2024-06-02 12:34:05 -04:00
Jason Volk
02081b66c4
Fix some unnecessary-unwraps w/ addl cleanup/simplification.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 12:34:05 -04:00
Jason Volk
b3fc8516ed
Fix unnested-or-patterns
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 12:34:05 -04:00
Jason Volk
9e51525c25
Fix uninlined-format-args
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 12:34:05 -04:00
Jason Volk
14039d9df4
cleanup unused extern crates.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 12:34:05 -04:00
Jason Volk
eed8a2a801
add and sort incomplete package metadata
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 12:34:05 -04:00
Jason Volk
c3a0d28309
add tracing span; mute connection errors.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 01:20:28 -04:00
Jason Volk
6d1144bb69
move unix socket unlink from services to router
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-02 01:20:28 -04:00
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
Jason Volk
1f3a9a40e5
lint clippy::collapsible_match (nightly)
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-21 20:22:17 -04:00
Jason Volk
362649ff87
rename src/bin to src/main
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-21 20:22:17 -04:00
strawberry
9bfa89a555
adjust debian metadata, set crane workspace name
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-21 20:22:17 -04:00
Jason Volk
6c1434c165
Hot-Reloading Refactor
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-21 20:22:17 -04:00
slonkazoid
ae1a4fd283
add modification time fallback if birth time is not supported on this platform
2024-05-21 16:58:30 -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
strawberry
4185a33747
fix: we should be checking for xml
MIME type instead
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-12 15:54:22 -04:00
strawberry
829307c83b
disallow svg MIME types to be inline
Content-Disposition
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-12 11:37:50 -04:00
strawberry
18e43e1d35
Reapply "bump various deps"
...
This reverts commit 6b918966d4
.
2024-05-10 22:56:44 -04:00
strawberry
09fca89ac5
Revert "rocksdb: enable async_io if using io_uring feature"
...
This reverts commit 6266e0ab5e
.
2024-05-10 22:56:44 -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
6b918966d4
Revert "bump various deps"
...
This reverts commit 653ec3799e
.
2024-05-09 22:38:05 -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
653ec3799e
bump various deps
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-09 17:42:05 -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
136cb038cf
auth_chain: add useful debug logging
2024-05-06 03:45:10 -04:00
Xiretza
8f89be0fbd
utils: add helper for adding unbounded slices to tracing spans
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
c6e6eb0af3
ignore empty CONDUWUIT_VERSION_EXTRA for server version
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-06 03:45:10 -04:00
strawberry
29babebc4d
adminroom: add count to list-joined-rooms user command
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
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
11ec0dff4f
add PATCH to list of allowed HTTP methods in CORS (MSC4138)
...
https://github.com/matrix-org/matrix-spec-proposals/pull/4138
we already had HEAD
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-06 03:45:10 -04:00
strawberry
6266e0ab5e
rocksdb: enable async_io if using io_uring feature
...
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
d7399a12fb
config: split at __
for struct sections of config, add couple missing settings for show-config
...
this makes `CONDUWUIT_WELL_KNOWN__CLIENT` a valid env variable config
option as it would normally exist under `[well_known.client]` in toml
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
7e2a15497c
use function comments for lsp here
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
e226046e15
drop default appservice_timeout to 35 seconds
...
AS's are generally hosted on the same machine or within the same
network
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
75b9332917
dont allow creating remote users in admin room
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -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
fa0bdd431b
add destination to X-Matrix Authorization outbound requests
...
we were already validating this for inbound requests
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
c4beb7d462
dont return "Allocator" header for server memory-usage if empty
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
0f13ada300
return more user-friendly message for debug memory-stats
...
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
strawberry
8ec9372a8e
lint
...
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
096c252dc2
move hierarchy via servers higher up, add some debug logging to it
...
this entire thing needs to be cleaned up later, but i need spaces
to work
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
Jason Volk
3585e8a2ef
rename / simplify tester stub for now
...
Signed-off-by: Jason Volk <jason@zemos.net>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
Jason Volk
b19d2ad5b0
daily logging improvements
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-03 01:52:29 -04:00
Jason Volk
8ecf722abb
split http serving from main.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-03 01:52:29 -04:00
Jason Volk
5d76db8f19
add configuration for rocksdb direct-io enablement
...
Signed-off-by: Jason Volk <jason@zemos.net>
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
35114dde7d
add query_over_tcp_only config option for hickory
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
62fd6e2c7c
set AD bit to false in hickory
...
this is purely DNSSEC related which we don't use, and DNSSEC on matrix
is unbearable for federation (no one sets it up properly, it's extremely taxing, etc)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
668a7645e9
add ip_lookup_strategy config option for hickory resolver
...
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
d32ea6ec20
cargo doc lints
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
041a7a90f3
hot lib things again
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
9c0c4c292c
document hot_lib for developers 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
b282c1eb6d
add (probably messy) support for hot lib reload via admin command
...
`!admin test test1`
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
e7505a4b20
resolve ptr_as_ptr lint
...
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
8f17d965b2
use <pre>
for codeblock formatting in jemalloc stats, link to ffi func
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
Jason Volk
9f5d7b0761
fix mallctl suite lints
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-03 01:52:29 -04:00
Charles Hall
4faf690f57
run clippy on default, all, and allocator features
...
This way all 4 major configurations are linted.
2024-05-03 01:52:29 -04:00
Charles Hall
3b05417246
handle the case where 0 or >1 allocs are enabled
...
In particular this fixes `cargo build --all-features`.
2024-05-03 01:52:29 -04:00
Charles Hall
e0c0d51a05
fix lints
2024-05-03 01:52:29 -04:00
Jason Volk
e4b669360f
start mallctl suite w/ jemalloc stats
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-03 01:52:29 -04:00
Jason Volk
56f652c12d
cleanup admin worker loop
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-03 01:52:29 -04:00
Jason Volk
4b6938e0f6
add admin server uptime command
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-03 01:52:29 -04:00
Benjamin Lee
56f1e905de
add config option tracing_flame_output_path
...
Hardcoding the output path to something in CWD is a pain if you're running
conduwuit through systemd or similar. Also made the error message when
it's unable to create the output file a little more friendly.
2024-05-03 01:52:29 -04:00
Benjamin Lee
646b31d2bd
flush tracing-flame output file on exit
...
Previously we were dropping the flush guard early, possibly causing
samples to be lost on exit.
2024-05-03 01:52:29 -04:00
Benjamin Lee
7d92515b1d
add tracing_flame_filter config option
...
The previous hardcoded filter `trace,h2=off` isn't appropriate in all
cases, it's better to have this be configurable.
2024-05-03 01:52:29 -04:00
Benjamin Lee
cc578d9a67
keep stdout logs when tracing-flame/jaeger is enabled
...
Previously, enabling the `tracing_flame` or `allow_jaeger` options would
prevent any logs from being written to stdout. In addition, enabling the
`allow_jaeger` option would inhibit the `tracing_flame` option.
Now that we have a way to use separate tracing filters with different
layers, we can enable all three at the same time without issues.
This commit also prevents the `debug log_level` command from modifying
the `tracing-flame` filter. This was supported previously, but I don't
think it's something that you would ever want to do intentionally. Now
that we have both the normal log filter and the `tracing-flame` filter
enabled at the same time, we want to `debug log_level` to only modify the
normal filter.
2024-05-03 01:52:29 -04:00
strawberry
bf713cd0ba
lints
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
61f813c187
admin command to get rooms a remote user is in, remove unnecessary dedupe+sort
...
imagine this SQL query but in conduwuit:
select * from users_in_public_rooms where user_id like '%user_id%';
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
b4035bf0da
increase default dns cache entries
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-03 01:52:29 -04:00
Jason Volk
37ecb4f2b9
decrease log verbosity for potentially cached NoRecordsFound
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-03 01:52:29 -04:00
Jason Volk
daf4b56435
fix inherited sequential small options
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-03 01:52:29 -04:00
strawberry
614ef5b3a1
raise dns_min_ttl_nxdomain back to 3 days
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
cfa89b8b64
add remaining other rocksdb compression options
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
strawberry
9f245281b1
never allow only 1 tokio worker or rocksdb parallelism thread (max compare)
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-03 01:52:29 -04:00
Benjamin Lee
8a5599adf9
add optional support for tokio-console
...
This turned out to be quite hairy, mostly because we need to apply the
config's log level filter to the actual logs (stdout and, optionally
sentry), but do not want to filter out the tokio tracing events needed by
the console_subscriber. I hit several edge cases in tracing getting
this to work, and we now depend on a git version of tracing with a
backported patch :(
2024-05-03 01:52:29 -04:00
Jason Volk
66e3e95b78
use logical core count for rocksdb parallelism
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
33afd60026
use number of logical cores for tokio worker thread count
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
54eb634588
add rocksdb compaction thread priority/iopriority w/ conf
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
strawberry
1da3048bb8
allow accepting CONDUWUIT_
prefixed config options
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
c87ea1dea1
delete unused servername_ratelimiter
semaphore now
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
d55015ccda
rename release_log_level
dev feature to dev_release_log_level
, some rebranding
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
Jason Volk
67f9553790
backoff to valhalla
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
255bcf5243
split sending from mod interface.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -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
0b33eec1c2
remove max_concurrent_requests sender hazard
...
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
49e453fe07
cleanup/refactor sender base loop
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
d19573c7b5
Revert "Revert "prevent empty transactions from going out""
...
This reverts commit bb43351658
.
2024-04-26 02:03:40 -04:00
strawberry
c57601a4b8
delete all active requests for the appservice when we delete it
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
dc35d06c0a
misc changes
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
c915f3dec5
resolve rust 1.75 error?
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
bd73103713
adjust appservice sending logging
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
eb5dcf08c6
remove unnecessary appservice reqwest timeout, reduce couple unwraps, return if unsuccessful HTTP response
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
46ce15f61f
slightly adjust pusher logging, return if non-successful status instead of continuing
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
ee07e3e975
missing semicolon
...
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
Jason Volk
57e6af6e21
split sending/send base functions
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
f919fa879b
abbrev destination in sender
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
strawberry
d91f24d841
partially revert this in main.rs
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
Jason Volk
e90ab8ec8e
split request base result handling and tweak logging
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
aef77bd338
add release_log_level feature to simulate release logs in debug mode.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
3140f101c1
move clap into utils
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
strawberry
0734b52a8a
slight misc error.rs changes
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
418ec87cfd
try logging the full URI instead of just the path for tracing_span
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
6394b1812c
use 403 for auth check fails everywhere else
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
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
a730adb836
use perf_measurements attributes here
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
Jason Volk
b7a494c40d
reduce tls override cache lock exposure
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
strawberry
17d0c869b0
remove some various unused functions and mark some possibly important ones *for now*
...
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
5e8ae971f1
flip min_duration and max_duration
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
Jason Volk
1595037427
cleanup scoped types; improve error logging
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
938d1f6e77
add conf item for sender retry backoff limit
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
Jason Volk
f273e8feb5
resolver defaults to error for everything except NoRecordsFound.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-26 02:03:40 -04:00
strawberry
906057dd8d
add all
admin query command for appservices
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
d90ac11603
remove mentions of "outgoing_kind" everywhere else too
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-26 02:03:40 -04:00
strawberry
e26cd5e296
rename OutgoingKind to Destination, add QueuedRequests and ActiveRequestsFor admin query commands
...
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
Jason Volk
423fc6dad0
precompute cidr range denylist; move validator.
...
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
b3f03d307d
try finding more servers for federation hierarchy instead of room ID server name
...
just the room ID server name is terrible
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