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

Always update tracked users when sharing keys #1733

Merged
merged 1 commit into from
Mar 9, 2023
Merged

Conversation

Anderas
Copy link
Contributor

@Anderas Anderas commented Mar 8, 2023

Resolves https://github.com/matrix-org/element-web-rageshakes/issues/19974

There are some rare cases when room members are not correctly tracked in OlmMachine (investigating separately), which is typically triggered by m.room.membership events. To solve the consequence (rather than the root cause), ensure that we always update tracked users when sharing keys, even if this does not trigger keys query for the current event, but will do so before the next one. In other words if we do indeed have users that are not yet tracked, they will be unable to decrypt at most the current message, but should recieve the key for the next message.

@Anderas Anderas requested review from a team and stefanceriu and removed request for a team March 8, 2023 10:34
@codecov
Copy link

codecov bot commented Mar 8, 2023

Codecov Report

Patch coverage: 87.50% and project coverage change: +11.89 🎉

Comparison is base (a3c7edc) 25.56% compared to head (64b24a4) 37.46%.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #1733       +/-   ##
============================================
+ Coverage    25.56%   37.46%   +11.89%     
============================================
  Files          612      612               
  Lines        96470    96510       +40     
  Branches     41592    41706      +114     
============================================
+ Hits         24664    36153    +11489     
+ Misses       70989    59280    -11709     
- Partials       817     1077      +260     
Impacted Files Coverage Δ
...trixSDK/Crypto/CryptoMachine/MXCryptoMachine.swift 23.98% <0.00%> (+7.47%) ⬆️
MatrixSDK/Crypto/MXCryptoV2.swift 14.04% <0.00%> (ø)
...o/Algorithms/RoomEvent/MXRoomEventEncryption.swift 81.50% <85.71%> (+77.22%) ⬆️
...ms/RoomEvents/MXRoomEventEncryptionUnitTests.swift 96.31% <100.00%> (+96.31%) ⬆️
...cretStorage/JSONModels/MXSecretStorageKeyContent.m 91.48% <0.00%> (-8.52%) ⬇️
MatrixSDK/Lib/NSObject+sortedKeys.m 30.76% <0.00%> (-3.52%) ⬇️
...xSDK/Crypto/Algorithms/Megolm/MXMegolmEncryption.m 89.48% <0.00%> (-2.28%) ⬇️
...yncResponseFileStore/MXSyncResponseFileStore.swift 74.48% <0.00%> (-0.77%) ⬇️
...DK/Crypto/KeySharing/Secret/MXSecretShareManager.m 66.89% <0.00%> (ø)
MatrixSDK/MXRestClient.m 27.12% <0.00%> (+0.19%) ⬆️
... and 212 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Anderas Anderas requested review from a team and nimau and removed request for stefanceriu and a team March 9, 2023 10:02
Copy link
Contributor

@nimau nimau left a comment

Choose a reason for hiding this comment

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

LGTM

@Anderas Anderas merged commit 7b83d58 into develop Mar 9, 2023
@Anderas Anderas deleted the andy/tracking_users branch March 9, 2023 11:11
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.

2 participants