element-hq / element-ios

A glossy Matrix collaboration client for iOS
https://element.io
Apache License 2.0
1.72k stars 480 forks source link

Element-iOS session doesn't encrypt for a dehydrated device #7795

Closed giomfo closed 1 week ago

giomfo commented 1 month ago

Steps to reproduce

  1. log an account userA in a Element-WebR client (this session will be the only one for userA)
  2. create an encrypted room and invite another account userB. The userB joins the room
  3. enable the device dehydration v2 feature on Element-WebR client for userA (see https://github.com/element-hq/element-meta/issues/2278)
  4. log out the userA
  5. send a message in the encrypted room from userB
  6. log the userA in again

Outcome

What did you expect?

The userA is able to decrypt and read the message sent by userB

What happened instead?

The message is not decrypted on userA side (UTD message)

Your phone model

No response

Operating system version

No response

Application version

v1.11.10

Homeserver

No response

Will you send logs?

No

giomfo commented 1 month ago

reproduced on E-Android: https://github.com/element-hq/element-android/issues/8836

giomfo commented 1 month ago

investigation on Element-Android sources: https://github.com/element-hq/element-android/issues/8836#issuecomment-2129414426