-
Notifications
You must be signed in to change notification settings - Fork 14
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
EX: Messages sent after an identity reset can sometimes be flagged as sent from insecure device #2697
Comments
duplicate of #2710? |
I was unable to reproduce this, as written, on either EX or EW. If Bob logs out before Alice logs in, the symptoms are as written; but that makes this a duplicate of #2710. |
Wait wait wait. I was able to reproduce it on EX (only) by adding a |
In EW, whenever we get an update to an existing In EX, we only re-decrypt UTD messages (https://github.com/matrix-org/matrix-rust-sdk/blob/d755a8a3aa0ecf7b718487b0401b9f3cee7f3155/crates/matrix-sdk-ui/src/timeline/controller/mod.rs#L1048): I think we should remove this constraint. |
Something like this @richvdh ?
|
yes, something like that! |
I noticed that the messages were UTD for a while, and then they appeared, so I'm guessing this is why |
Or maybe just because I am actually stopping and restarting the EX process. I will try again to find a way to stop the network without restarting the process. |
I am able to reproduce this when I can persuade the Android emulator to go offline. I think the reason it was difficult was because I am reverse-forwarding To go offline I run:
Note that this doesn't work on its own. I also need to restart Synapse, presumably because that breaks the established connection. Then to go back online, I just run the original |
Steps to reproduce
The new message sent by Alice is marked as
Sent from an device not verified by its owner
. (Or, in "exclude insecure devices" mode, the message is hidden altogether.This is an intermittent failure: it depends how long the
/keys/query
request takes to complete.Note that:
What happened:
When coming back online, Bob first receives the new room_key for the new message; the device_keys embedded in the to-device are are not signed with the identity we have for Alice (rather, they are signed by her new identity). The
InboundGroupSession
is therefore marked as insecure.Meanwhile, Alice is marked as dirty, so the a new
/keys/query
is made; once that completes, we receive her new identity and devices. The device update triggers an update of theInboundGroupSession
, meaning future messages are decrypted correctly; however the cached timeline is not updated on EX. (It is updated on EW.)Related to matrix-org/matrix-rust-sdk#3890 and #2710.
The text was updated successfully, but these errors were encountered: