This repository was archived by the owner on Jun 20, 2023. It is now read-only.
Grant one more encryption reset attempt for users on v1.6.0 (EXPOSUREAPP-3313) #1492
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The mitigation for the encryption issue is already in place but we are still trying to help those users that are just updating the app in the background automatically hoping for a solution to their error when opening the app.
Either the mitigation works or it doesn't so resetting the data should only happens once.
If the mitigation does not work and the issue reappears we don't want to keep resetting the data.
@vaubaehn noticed that users who upgraded to 1.5.0 before 1.5.1 was available, and who were affected by the encryption issue, the data reset attempt was already consumed without helping those users, due to a bug in the previous implementation, and it should be retried.
This PR adds a new stored boolean value, ignoring the previous one, such that for everyone affected by the issue, the recovery through data reset will be attempted once again if the error case matches.
Testing
Sadly this can't be easily tested again and manually editing the code to throw exceptions, and reviewing code + unit-tests is required.