Commit Graph

68 Commits

Author SHA1 Message Date
Matthias Ahouansou
6455e918be fix: don't always assume ruma can generate reference hashes 2024-07-07 21:40:56 +01:00
Matthias Ahouansou
62f1da053f feat(appservice): support timestamped messaging 2024-06-25 10:25:58 +01:00
Matthias Ahouansou
c453d45598 fix(keys): only use keys valid at the time of PDU or transaction, and actually refresh keys
Previously, we only fetched keys once, only requesting them again if we have any missing, allowing for ancient keys to be used to sign PDUs and transactions
Now we refresh keys that either have or are about to expire, preventing attacks that make use of leaked private keys of a homeserver
We also ensure that when validating PDUs or transactions, that they are valid at the origin_server_ts or time of us receiving the transaction respectfully
As to not break event authorization for old rooms, we need to keep old keys around
We move verify_keys which we no longer see in direct requests to the origin to old_verify_keys
We keep old_verify_keys indefinitely as mentioned above, as to not break event authorization (at least until a future MSC addresses this)
2024-06-12 19:41:43 +02:00
Matthias Ahouansou
144d548ef7 fix: permission checks for aliases 2024-06-12 19:41:31 +02:00
Benjamin Lee
7b259272ce fix: do not return redacted events from search 2024-06-12 19:41:02 +02:00
Matthias Ahouansou
ba2a5a6115 chore: bump all dependencies 2024-06-11 20:35:56 +01:00
Matthias Ahouansou
19154a9f70 refactor: add server_user to globals 2024-05-31 21:56:11 +01:00
Matthias Ahouansou
df0ad2d07c fix(appservices): don't forward events relating to remote users, and forward events relating to remote aliases 2024-04-27 20:41:28 +01:00
Matthias Ahouansou
1c4ae8d268 fix(redaction): use content.redacts when checking v11 events 2024-04-24 10:52:33 +01:00
Matthias Ahouansou
00d6aeddb6 refactor(redactions): move checks inside conduit
ruma was already accidentally performing these checks for us, but this shouldn't be the case
2024-04-23 23:05:27 +01:00
Matthias Ahouansou
7a7c09785e feat(pdu): copy top level redact to content and vice versa 2024-04-17 19:34:36 +02:00
Matthias Ahouansou
92817213d5 Add missing import 2024-04-12 05:15:37 +00:00
Matthias Ahouansou
ab8592526f Replace panic!() with unreachable!() 2024-04-12 05:14:39 +00:00
Val Lorentz
b5e21f761b Merge branch 'next' into 'room-v11'
# Conflicts:
#   src/service/rooms/timeline/mod.rs
#   src/utils/error.rs
2024-04-11 17:34:42 +00:00
Matthias Ahouansou
e88d137bd7 Replace panic!() with unreachable!() 2024-04-11 17:19:42 +00:00
Matthias Ahouansou
b20483aa13 refactor(appservices): avoid cloning frequently 2024-03-22 20:53:27 +00:00
Timo Kösters
0bb28f60cf refactor: minor appservice code cleanup 2024-03-22 08:59:36 +01:00
Matthias Ahouansou
fa930182ae fix(appservices): don't panic on empty registration url
perf(appservices): cache regex for namespaces
2024-03-10 13:27:48 +00:00
Matthias Ahouansou
becaad677f refactor: use async-aware RwLocks and Mutexes where possible 2024-03-05 14:23:59 +00:00
Matthias Ahouansou
da5975d727 fix: avoid panics when admin room is not available 2024-03-03 22:42:24 +00:00
Matthias Ahouansou
e06e15d4ec fix(accounts): don't give guests admin 2024-03-03 11:26:58 +00:00
Charles Hall
9453dbc740 update rust toolchain
It comes with a bunch of new lints (yay!) so I fixed them all so CI will
keep working.

Also apparently something about linking changed because I had to change
the checks for deciding the linker flags for static x86_64 builds to
keep working.
2024-01-25 21:44:40 -08:00
Timo Kösters
e0358a9de5 Merge branch 'send_push_to_invited_user' into 'next'
feat: send push notification on invite to invited user and etc

Closes #399

See merge request famedly/conduit!559
2024-01-24 17:55:22 +00:00
Charles Hall
ab1fff2642 fix cargo clippy lints 2024-01-24 07:22:37 -08:00
Val Lorentz
8175bc1246 Explicitly match RoomVersionId::V11 2023-12-24 19:04:48 +01:00
Val Lorentz
eb7ac91cd5 Reuse existing get_room_version 2023-12-24 19:02:03 +01:00
Val Lorentz
5a7bb1e8f1 Return error instead of panic when first event is not m.room.create 2023-12-02 17:51:19 +01:00
Val Lorentz
fac995036a create_hash_and_sign_event: Use actual version of RoomCreate events, instead of the default 2023-12-01 18:29:15 +01:00
Val Lorentz
a3b8eea9b4 Move "redacts" key to "content" in redaction events in v11 rooms 2023-12-01 18:28:51 +01:00
Val Lorentz
d39d30008a Remove "creator" property from rooms >= v11 2023-12-01 15:11:26 +01:00
AndSDev
f3b6b3e222 feat: send push notification on invite to invited user and etc 2023-11-07 12:46:53 +00:00
Timo Kösters
606b25b9e7 improvement: more forgiving admin command syntax 2023-08-10 17:26:55 +02:00
Timo Kösters
bac13d08ae fix: cache invalidation 2023-07-02 22:50:50 +02:00
Timo Kösters
be877ef719 Improve sync performance with more caching and wrapping things in Arcs to avoid copies 2023-06-27 13:15:11 +02:00
Timo Kösters
72eb1972c1 Add relations endpoints, edits and threads work now 2023-06-26 12:38:51 +02:00
Timo Kösters
49a0f3a60d fix: /context for element android. start and end must be set even with limit=0 2023-06-26 08:33:31 +02:00
Timo Kösters
c7e0ea525a feat: WIP relationships and threads 2023-06-25 19:40:33 +02:00
Timo Kösters
1f1444da8c Merge branch 'pushrules' into 'next'
Improvements to pushrules endpoints

Closes #316

See merge request famedly/conduit!461
2023-05-21 10:41:31 +00:00
Jonathan Flueren
f5e3b0e2dd Recognize admin commands without : after tag
Very useful since many Matrix clients don't insert : after user tags
2023-05-15 19:25:57 +00:00
Kévin Commaille
f53ecaa97d Bump Ruma 2023-03-18 15:03:56 +01:00
Timo Kösters
eae0989c40 fix: refactor backfill and add support for search 2023-03-13 10:39:17 +01:00
Timo Kösters
17a6431f5f fix: make backfilled events reachable 2023-03-13 10:39:17 +01:00
Timo Kösters
7bdd9660aa feat: ask for backfill 2023-03-13 10:39:17 +01:00
Timo Kösters
f95dd4521c Merge branch 'validate-state-of-admins-room' into 'next'
Validate PDU in admins room

See merge request famedly/conduit!382
2023-01-24 13:46:49 +00:00
Nyaaori
c86313d4fa chore: code cleanup
https://rust-lang.github.io/rust-clippy/master/index.html#op_ref

https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string

https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
2022-12-21 10:42:12 +01:00
AndSDev
e923f63c49 fix(service/rooms/timeline): fix validating for non-joined members 2022-10-14 14:45:05 +03:00
AndSDev
d755a96c2c refactor(service/rooms/timeline): add cache for server_name 2022-10-13 11:19:51 +00:00
AndSDev
76f81ac201 feat(db/rooms): disable banning for last user and conduit user in admins room 2022-10-13 14:15:23 +03:00
AndSDev
912491cb28 style(db/rooms): refactor admin room pdu validating 2022-10-13 14:04:26 +03:00
AndSDev
da2dbd2877 feat(db/rooms): disable leaving from admin room for last user 2022-10-13 13:09:26 +03:00