Lambda
74589043f7
Fix weird type gymnastics
2024-09-08 09:54:04 -07:00
Lambda
5c4062742f
Log curl command line for all requests at trace
2024-09-08 09:10:40 -07:00
Lambda
b0f33207fe
Add wrapper types for short IDs
2024-09-06 17:20:14 +00:00
Lambda
f1642c92d1
Take iterator in calculate_hash()
...
Avoids unnecessary allocations.
2024-09-06 17:20:14 +00:00
Lambda
cce83beedb
Properly type stored EDUs
2024-09-06 17:20:14 +00:00
Lambda
26322d5a95
Add PduId wrapper struct
...
Death to Vec<u8>
2024-09-06 17:20:14 +00:00
Lambda
341f4213d0
Use self instead of going through services()
2024-09-05 19:42:37 +00:00
Lambda
f52cf53931
Remove obsolete clippy #[allow]s
2024-09-05 19:42:37 +00:00
Lambda
22ce624a81
event_handler: remove AsyncRecursiveType alias, simplify signatures
2024-09-05 19:42:37 +00:00
Lambda
542e097cdf
server_server: use non-deprecated create_join_event types
...
Instead of working with v1 types and converting them to v2 as required,
do it the other way around. Allows us to remove a very broad
#[allow(deprecated)].
2024-09-05 19:42:37 +00:00
Benjamin Lee
be14f5bddc
fetch signing keys on join even when no cached keys for origin
...
Silly mistake
2024-09-01 12:22:10 -07:00
Lambda
b4fecbc517
client/media: work around matrix-media-repo bug
...
It rejects Authenticated Media requests if X-Matrix values aren't
unnecessarily quoted:
https://github.com/t2bot/matrix-media-repo/issues/609
2024-09-01 09:42:45 +00:00
Lambda
3fe0110649
media: convert allow_remote to enum
2024-09-01 09:42:45 +00:00
Lambda
a4b7df1b3a
media: use FileMeta instead of tuples
2024-09-01 09:42:45 +00:00
Lambda
1ccb1e572b
media: add MediaFileKey wrapper
...
One more win in the fight against the Vec<u8>s
2024-09-01 09:42:45 +00:00
Lambda
84850a163d
Factor content out of FileMeta
...
That's not what *meta*data means
2024-09-01 09:42:45 +00:00
Lambda
a06c8db996
Fetch and thumbnail original media if fetching thumbnail fails
...
E.g. because the remote server's thumbnail endpoint is broken in
hilarious ways: https://github.com/element-hq/synapse/issues/17518
2024-09-01 09:42:45 +00:00
Lambda
d3b6718812
server_server: implement authenticated media endpoints
2024-09-01 09:42:45 +00:00
Lambda
79053ad052
client_server: use and provide authenticated media API
2024-09-01 09:42:45 +00:00
Lambda
7f6ab63752
client_server: factor out width/height conversion
2024-09-01 09:42:45 +00:00
Lambda
edfaa83405
server_server: make outbound requests using spec v1.11
...
This is required for authenticated media requests, which are otherwise
performed using the unstable endpoint.
2024-09-01 09:42:45 +00:00
Lambda
94204415ee
Add MxcData helper
2024-09-01 09:42:45 +00:00
Lambda
64b3c357dd
media: put old API behind legacy_media import
2024-09-01 09:42:45 +00:00
Lambda
5a5bea3217
cargo update ruma httparse
...
This adds authenticated media APIs.
2024-09-01 09:42:45 +00:00
Stephen D
926091223d
fetch keys that are expired
2024-08-31 23:25:44 -03:00
Stephen D
1b13d7f7ab
Fix bug when retrieving keys for an event.
...
It's possible for a server to have multiple associated public keys. This can happen when a Matrix server is set up on a particular domain, its key is lost, and the server continues running on the domain. Now there will be two keys associated to the domain. The old logic wouldn't fetch the new key if we already had the old key cached. The new logic will fetch any keys we don't have that we need, rather than just fetching one key per server.
2024-08-31 23:02:53 -03:00
Stephen D
2db3b18ce8
Clean up existing code in get_server_keys_from_cache. It's a little DRYer now
2024-08-31 22:25:43 -03:00
Lambda
006ea0eb94
Fix appservice users getting invited over federation
...
Invites are magic sauce, we need to manually send it off to the
appservice if it's for an appservice user.
2024-08-31 10:18:29 +00:00
Benjamin Lee
4ad50e2708
only log banned users if they are local
...
This was the intent of f03b6cde29 , but it
was missing the check that the user is actually local, and so was
logging *all* banned users.
2024-08-30 23:08:52 -07:00
avdb13
f03b6cde29
feat: report local users getting banned
2024-08-26 02:17:01 +02:00
Lambda
14afa1357e
tracing: allow configuring service name
...
This is essential when consuming tracing data from multiple servers.
2024-08-24 19:31:39 +00:00
avdb13
00b77144c1
chore: deprecate support for unstable room versions
2024-08-12 06:18:28 +02:00
Benjamin Lee
91739899e7
changelog entry for remote device key query logging
2024-08-11 16:39:08 -07:00
Benjamin Lee
141c60e4a3
log more detailed backoff state for remote device key requests
2024-08-11 16:39:08 -07:00
Benjamin Lee
1551833501
log failed remote device key requests
2024-08-11 16:39:08 -07:00
Benjamin Lee
a32dc1a3ee
tolerate invalid m.direct events when upgrading rooms
...
Previous behavior was causing us to error out of the entire
state_cache::update_membership function when it saw an invalid m.direct,
making it impossible for affected users to join upgraded rooms. This bug
is especially bad if an affected user attempts to upgrade a room,
because we will fail to create their join event in the new room, leaving
both rooms permanently bricked.
The new behavior should never prevent users from joining a room based on
the contents of their account data, and should migrate the `m.direct`
event in a reasonable way even if it is partially corrupted by the
element bug.
This also fixes a bug where the previous implementation will
unintentionally remove any keys that aren't part of the expected
m.direct schema. I don't know of any cases where this came up in
practice.
Fixes : #46
2024-08-11 15:53:25 -07:00
Benjamin Lee
18360cd3f9
refactor error handling in copy_upgraded_account_data_tag
...
The new error handling logic is semantically different from the old, but
I don't know of any cases you could hit in practice where it would
matter.
2024-08-11 15:53:24 -07:00
Benjamin Lee
51dd75c3dc
factor account data upgrade logic into functions
...
The implementation inside each function is unchanged from the original.
I intend to clean up and fix bugs in later commits, so the diff will be
more clear.
2024-08-11 15:53:24 -07:00
Lambda
dd24a44112
Use TokenSet for roomid_mutex_federation
2024-07-22 18:07:03 +00:00
Lambda
4893c54f4f
Use TokenSet for roomid_mutex_insert
2024-07-22 18:07:03 +00:00
Lambda
34ccb2cd06
Use TokenSet for roomid_mutex_state
2024-07-22 18:07:03 +00:00
Lambda
07b5233980
Use OnDemandHashMap for servername_ratelimiter
...
This way, semaphores are actually cleaned up eventually.
2024-07-22 18:07:03 +00:00
Lambda
2c19abc535
Add OnDemandHashMap and TokenSet
2024-07-22 18:07:00 +00:00
Lambda
aea6019c0a
upgrade_room_route: fix state lock
...
This was using the lock for the replacement room to send events to the
original room, which may or may not cause problems.
2024-07-22 18:06:11 +00:00
Lambda
ef1b6fe111
upgrade_room_route: give more descriptive names to locks
...
This makes the next commit, which is an actual fix, much easier to read.
2024-07-22 18:06:11 +00:00
tranquillity-codes
c70cfd3d25
Return 504 when a file is missing to be by-spec
...
The spec defines that the media endpoints should return 504 when a file
is not-yet-uploaded, which has been interpreted to include when a file
was deleted. Modifies the /media/v3/download/ and /media/r0/thumbnail
endpoints.
2024-07-21 20:42:07 -07:00
Charles Hall
96e6ac9563
fix service/rooms/spaces events
2024-07-16 11:16:08 -07:00
Charles Hall
b4d81bb067
fix service/rooms/event_handler events
2024-07-16 11:16:08 -07:00
Charles Hall
4b5d127368
fix service/rooms/state_cache events
2024-07-16 11:16:08 -07:00
Charles Hall
592e42ba7d
fix service/rooms/timeline events
2024-07-16 11:16:08 -07:00