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

Delete data for mismatched accounts #1763

Merged
merged 1 commit into from
Apr 12, 2023
Merged

Conversation

Anderas
Copy link
Contributor

@Anderas Anderas commented Apr 11, 2023

Resolves element-hq/element-ios#7488

When we recieve a "Mismatched account" error (meaning we have existing data for the current user but under a different device) we need to delete the previous data first before we can try to create the machine.

Note that this behaviour should not be happening as we delete data on logouts, but there are clearly edge-cases where this still occurs. In those cases we will log the error.

@Anderas Anderas requested review from a team and aringenbach and removed request for a team April 11, 2023 17:08
@codecov
Copy link

codecov bot commented Apr 11, 2023

Codecov Report

❗ No coverage uploaded for pull request base (hotfix/0.26.6@44cfbde). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@               Coverage Diff                @@
##             hotfix/0.26.6    #1763   +/-   ##
================================================
  Coverage                 ?   25.84%           
================================================
  Files                    ?      616           
  Lines                    ?    97191           
  Branches                 ?    41887           
================================================
  Hits                     ?    25118           
  Misses                   ?    71254           
  Partials                 ?      819           

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@aringenbach aringenbach left a comment

Choose a reason for hiding this comment

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

LGTM !

@@ -36,6 +36,8 @@ class MXCryptoMachine {
}

private static let kdfRounds: Int32 = 500_000
// Error type will be moved to rust sdk
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add this as a FIXME/TODO for visibility ?

Copy link
Contributor Author

@Anderas Anderas Apr 12, 2023

Choose a reason for hiding this comment

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

I am not a fan of adding TODOs to code, but it is tracked in a draft issue on a sprint board so to be resolved asap. Here its meant to be an explanatory comment rather than a TODO

@Anderas Anderas merged commit 2e4d9cd into hotfix/0.26.6 Apr 12, 2023
@Anderas Anderas deleted the andy/delete_data branch April 12, 2023 10:49
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