-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crypto: withhold outgoing messages to unsigned dehydrated devices #4551
base: main
Are you sure you want to change the base?
Conversation
* Split the existing `set_up_test_machine` into two parts, so we can set up the test OlmMachine without importing data for other users * Add some helpers for creating common `EncryptionSettings`
Per #4313, we should not send outgoing messages to dehydrated devices that are not signed by the current pinned/verified identity.
001dcf6
to
cac1067
Compare
// We only need the user identity if `only_allow_trusted_devices` or | ||
// `error_on_verified_user_problem` is set. | ||
let device_owner_identity = | ||
if only_allow_trusted_devices || error_on_verified_user_problem { | ||
store.get_user_identity(user_id).await? | ||
} else { | ||
None | ||
}; | ||
let device_owner_identity = store.get_user_identity(user_id).await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now also need the identity if the user has a dehydrated device. Trying to optimise away this call in the cases where we weren't going to need the identity was getting too complicated, so let's just do it every time.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4551 +/- ##
==========================================
- Coverage 85.40% 85.40% -0.01%
==========================================
Files 285 285
Lines 32213 32230 +17
==========================================
+ Hits 27513 27526 +13
- Misses 4700 4704 +4 ☔ View full report in Codecov by Sentry. |
I need to update this in view of #4313 (comment) |
Per #4313, we should not send outgoing messages to dehydrated devices that are not signed by the current pinned/verified identity.
Fixes #4313