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

feat: Prefer room keys with better SenderData when comparing duplicate room keys #4040

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

poljar
Copy link
Contributor

@poljar poljar commented Sep 27, 2024

This if a first attempt at addressing #3703. This isn't a full fix, but should address the most common case where the same room keys are received but contain different authenticity properties due to being received from different sources.

A more complete solution will need to utilize the InboundGroupSession::merge() method.

@poljar poljar requested review from a team as code owners September 27, 2024 12:45
@poljar poljar requested review from Hywan and andybalaam and removed request for a team September 27, 2024 12:45
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.

Project coverage is 84.50%. Comparing base (322c5b3) to head (6fb73ac).
Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
crates/matrix-sdk-crypto/src/machine/mod.rs 50.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4040   +/-   ##
=======================================
  Coverage   84.50%   84.50%           
=======================================
  Files         266      266           
  Lines       28475    28481    +6     
=======================================
+ Hits        24062    24068    +6     
  Misses       4413     4413           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

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

Rust code looks good, and the crypto logic sounds sensible. Thanks!

@bnjbvr bnjbvr removed the request for review from Hywan September 30, 2024 15:00
@poljar poljar merged commit e5bd760 into main Oct 1, 2024
40 checks passed
@poljar poljar deleted the poljar/prefer-keys-with-better-sender-data branch October 1, 2024 11:00
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