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(crypto): Fix crash loading older sender data from storage #4425

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andybalaam
Copy link
Member

@andybalaam andybalaam commented Dec 17, 2024

Fixes #4424

@andybalaam andybalaam requested review from a team as code owners December 17, 2024 15:50
@andybalaam andybalaam requested review from Hywan and poljar and removed request for a team December 17, 2024 15:50
Comment on lines +218 to 219
#[serde(alias = "SenderUnverifiedButPreviouslyVerified")]
VerificationViolation(KnownSenderData),
Copy link
Member

Choose a reason for hiding this comment

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

There are a whole bunch of other renames in #4067 that we need to check for; notably OwnUserIdentityVerifiedState (https://github.com/matrix-org/matrix-rust-sdk/pull/4067/files#diff-d28a9285dd9fd0d1ced29b1986dc92d7a754bb846a24cab48ec78073a1581166R874) which was the one that caused problems for Valere, but also VerificationLevel, and there may be others.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, was rushing to find a fix and missed the other places. Will expand this.

@poljar poljar removed the request for review from Hywan December 17, 2024 15:55
@poljar
Copy link
Contributor

poljar commented Dec 17, 2024

This talks about a crash, but we just changed the serialization format, deserialization failures should not result in crashes. So we need to also find where the crash happens and convert that to an error.

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.40%. Comparing base (0ca35d6) to head (385c0ab).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4425   +/-   ##
=======================================
  Coverage   85.39%   85.40%           
=======================================
  Files         283      283           
  Lines       31472    31472           
=======================================
+ Hits        26877    26880    +3     
+ Misses       4595     4592    -3     

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

@andybalaam
Copy link
Member Author

This talks about a crash, but we just changed the serialization format, deserialization failures should not result in crashes. So we need to also find where the crash happens and convert that to an error.

It was a crash, right @BillCarsonFr ? Can you paste the stack trace?

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.

Failed storage upgrade for "PreviouslyVerifiedButNoLonger"
3 participants