Skip to content
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

Fix | Share room keys with dehydrated devices #8842

Merged
merged 3 commits into from
Jun 12, 2024

Conversation

BillCarsonFr
Copy link
Member

Fixes #8836

The dehydrated flag was not parsed and sent to the rust layer, making this device unusable.

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Motivation and context

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

* Optional property `dehydrated`, which is set to true for dehydrated devices.
*/
@Json(name = "dehydrated")
val dehydrated: Boolean? = null,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should do more than just add the dehydrated flag, or else any other unknown fields that show up in a device will cause the same issue. Is it possible to add a general "unknown fields" property, like is done in Rust? Or can we just pass through the whole device key unparsed, since we end up just re-encoding it and the Rust code re-parses it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, now accepting any json payload for deviceKeys. It is not needed any how now (was usefull with legacy crypto, but now all signing and signature checking is done in the olmMachine layer)

@BillCarsonFr BillCarsonFr requested a review from uhoreg June 5, 2024 08:39
@BillCarsonFr BillCarsonFr force-pushed the feature/bca/send_to_dehydrated_devices branch from 4299477 to ad9f9fb Compare June 12, 2024 07:32
Copy link

sonarcloud bot commented Jun 12, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
50.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@BillCarsonFr BillCarsonFr merged commit 097d392 into develop Jun 12, 2024
12 of 13 checks passed
@BillCarsonFr BillCarsonFr deleted the feature/bca/send_to_dehydrated_devices branch June 12, 2024 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Element-Android session doesn't encrypt for a dehydrated device
3 participants