Commit graph

70 commits

Author SHA1 Message Date
Vitaly
8ff2824527
Fixed build against fmt 11. 2024-07-16 12:41:30 +02:00
Nicolas Werner
aef9617d1e
Make a few headers forward declarations 2024-03-16 11:50:39 +01:00
Nicolas Werner
06927cd3c2
Include moc files for a tiny speedup on incremental builds 2024-03-16 01:34:23 +01:00
Nicolas Werner
51236c3260
Fix verification with multiple devices in parallel
Fixes #1125
2024-01-15 02:17:18 +01:00
Nicolas Werner
1254ac41ce
Support "fixed" mac method in verification 2024-01-14 06:11:11 +01:00
Nicolas Werner
c130e4cf06
Use constant for sas verification mac 2024-01-14 06:11:11 +01:00
Nicolas Werner
c67f301f8b
Work around clazy claiming we connect a lambda 2023-12-13 17:20:34 +01:00
Nicolas Werner
ff82452816
Upgrade trust of megolm sessions when receiving RoomKey
Before we only did that, when we basically didn't have the key yet. But
since we usually get sent a RoomKey when a new message is sent after we
sign in, we were discarding, that those messages should usually now be
trusted.
2023-11-19 20:11:21 +01:00
Nicolas Werner
092b12361e
Downgrade self verification status logging to debug
fixes #1560
2023-11-01 06:13:24 +01:00
Nicolas Werner
7824c77234
Cleanup headers a bit more 2023-10-31 18:47:58 +01:00
Nicolas Werner
99a3e8bcf2
Speed up compilation a bit 2023-10-31 13:04:39 +01:00
Nicolas Werner
d45dc6c77b
Migrate olm sessions to be stored in one database instead of thousands 2023-10-23 01:40:10 +02:00
Loren Burkholder
8365cb215b Remove some unnecessary forward declarations and headers 2023-08-11 22:14:27 -04:00
Nicolas Werner
d08535efbb
Remove final which breaks type registration 2023-07-16 20:32:19 +02:00
Nicolas Werner
9d16f2e8b4
Fix verification error codes 2023-07-16 19:25:37 +02:00
Nicolas Werner
e89e65dc17
Fix build against fmt10
fixes #1499
2023-06-28 13:16:10 +02:00
Nicolas Werner
ce1a64bc19
Move to automatic type registration 2023-06-19 01:38:40 +02:00
Nicolas Werner
9e983b1584
Remove a few more QPairs 2023-06-08 22:32:12 +02:00
Nicolas Werner
5fed4d21b1
Fix a few more clazy warnings 2023-06-08 22:32:11 +02:00
Nicolas Werner
10b65b78fa
Adapt to the new inherited variant 2023-04-11 01:38:46 +02:00
Nicolas Werner
96f791daf1
Get rid of year in license headers
See also:
https://daniel.haxx.se/blog/2023/01/08/copyright-without-years/
https://hynek.me/til/copyright-years/
2023-02-21 23:48:49 +01:00
Nicolas Werner
a11b1221a3
Switch to upstream olm error code 2023-02-21 02:21:31 +01:00
Nicolas Werner
920409e914
Reduce code bloat a bit
Especially the emoji array shrinks a lot with this, but adds a few extra
relocations on startup. But it removes a lot of exception handling code
at runtime, which is nice and possibly this is still faster.
2023-02-19 21:38:28 +01:00
Nicolas Werner
20740c9976
Automatically fetch keys for undecrypted messages after verification
Also fix rerendering edited messages after keys are received.

fixes #1375
fixes #770
fixes #888
2023-02-18 03:08:23 +01:00
Nicolas Werner
1d8fc18304
Warn when no secret can be requested 2023-01-22 05:31:33 +01:00
Jason Volk
0253aa59c7
Skip empty requests for cross-signing keys when user only has one device.
Cause: Request button pressed in user settings.

Result: Request body is jsNull; sendToDevice requires jsObject.
2023-01-22 05:26:10 +01:00
Nicolas Werner
b84bc7895e
Add some more error logging 2023-01-09 02:06:49 +01:00
Nicolas Werner
3a6a905429
A whole new year full of excitement and possibilities! 2023-01-02 04:25:33 +01:00
Nicolas Werner
537fa437e2
Store secrets (apart from the pickle key) in the database 2022-11-06 03:36:56 +01:00
Nicolas Werner
676a6506cb
Speedup sending encrypted messages after metasync was reenabled
Calling fsync everytime we save to the db is slow, which is actually
fairly noticeable in some larger E2EE rooms. Speed that up slightly by
batching the olm session persisting.
2022-11-01 20:58:01 +01:00
Nicolas Werner
b28fa86e6a
Enable -Wconversion 2022-10-26 01:10:35 +02:00
Nicolas Werner
af699eb83e
Mark classes as final where possible 2022-10-10 14:38:45 +02:00
Loren Burkholder
8ecbb39dc6
cppcheck stuff (#1200)
* cppcheck stuff

* Update src/ui/RoomSettings.cpp

Co-authored-by: DeepBlueV7.X <nicolas.werner@hotmail.de>

* Update src/ui/RoomSettings.cpp

Co-authored-by: DeepBlueV7.X <nicolas.werner@hotmail.de>

* Fix linting

Co-authored-by: DeepBlueV7.X <nicolas.werner@hotmail.de>
2022-10-03 21:57:30 +00:00
Nicolas Werner
a55fc8e43b
Work around MSVC bug with structured bindings in lambdas
Causes error messages like:
error C3493: 'key_id' cannot be implicitly captured because no default capture mode has been specified
2022-10-02 02:06:09 +02:00
Nicolas Werner
2fde381a82
Merge branch 'v0.10.2-fixes' 2022-09-28 14:27:54 +02:00
Nicolas Werner
67bee15a38
Prevent the homeserver from inserting malicious secrets
Correctly verify that the reply to a secrets request is actually coming
from a verified device. While we did verify that it was us who replied,
we didn't properly cancel storing the secret if the sending device was
one of ours but was maliciously inserted by the homeserver and
unverified. We only send secret requests to verified devices in the
first place, so only the homeserver could abuse this issue.

Additionally we protected against malicious secret poisoning by
verifying that the secret is actually the reply to a request. This means
the server only has 2 places where it can poison the secrets:

- After a verification when we automatically request the secrets
- When the user manually hits the request button

It also needs to prevent other secret answers to reach the client first
since we ignore all replies after that one.

The impact of this might be quite severe. It could allow the server to
replace the cross-signing keys silently and while we might not trust
that key, we possibly could trust it in the future if we rely on the
stored secret. Similarly this could potentially be abused to make the
client trust a malicious online key backup.

If your deployment is not patched yet and you don't control your
homeserver, you can protect against this by simply not doing any
verifications of your own devices and not pressing the request button in
the settings menu.
2022-09-28 13:36:52 +02:00
Nicolas Werner
851333a50d
Switch to clang-format14 2022-09-25 20:05:08 +02:00
Nicolas Werner
db43743697
Fix too many fmt parameters 2022-07-30 16:47:55 +02:00
Nicolas Werner
3c480d47f1
Make code compile with hidden friends 2022-07-29 04:04:44 +02:00
Nicolas Werner
904745543a
Verifications sneakily accumulating in the background 2022-07-22 11:46:37 +02:00
Nicolas Werner
ead10cd0fd
Request full online keybackup when turning it on 2022-06-19 16:37:00 +02:00
Nicolas Werner
35ff02ce48
Remove a few more headers 2022-06-18 02:31:01 +02:00
Nicolas Werner
8cdfbf9391
Get rid of 'using json = nlohmann::json' 2022-06-17 22:03:54 +02:00
Nicolas Werner
ef941920ea
Fix compilation without implicit nlohmann conversions 2022-06-17 03:14:48 +02:00
Nicolas Werner
beb59d5d2e
Simplify includes a bit 2022-06-16 01:19:26 +02:00
Nicolas Werner
62b3b461ec
Fix comparison for glare algorithm 2022-06-12 19:09:07 +02:00
Nicolas Werner
00740a7e65
Properly handle glare when verifying 2022-06-12 17:53:17 +02:00
Nicolas Werner
90da39313f
Use right linter 2022-05-10 03:53:35 +02:00
Nicolas Werner
a6b2be112b
More image dialog fixes 2022-05-10 03:20:09 +02:00
Nicolas Werner
66b7ff639c Remove sender key from megolm session index
implements MSC3700

see https://github.com/matrix-org/matrix-spec-proposals/pull/3700
2022-04-08 01:53:00 +02:00