Reset key storage if restoring from Recovery encounters the wrong decryption key#32668
Merged
andybalaam merged 3 commits intodevelopfrom Mar 5, 2026
Merged
Conversation
269011a to
5e7ff45
Compare
5e7ff45 to
30eb97e
Compare
30eb97e to
1045654
Compare
florianduros
reviewed
Mar 3, 2026
apps/web/test/unit-tests/components/views/settings/encryption/RecoveryPanelOutOfSync-test.tsx
Outdated
Show resolved
Hide resolved
uhoreg
approved these changes
Mar 3, 2026
florianduros
approved these changes
Mar 4, 2026
apps/web/test/unit-tests/components/views/settings/encryption/RecoveryPanelOutOfSync-test.tsx
Outdated
Show resolved
Hide resolved
Without this, we can't override MatrixClient methods until we've called `renderComponent`, which is awkward.
It turns out the existing test didn't actually go down the expected code path and call loadSessionBackupPrivateKeyFromSecretStorage.
…ryption key Fixes #31793 Depends on matrix-org/matrix-js-sdk#5202 When we try to load the key storage decryption key from Recovery, but we find that it does not match the public key of the current key storage backup, create a new key storage backup.
1b7bc9b to
ae33ec1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #31793
Depends on matrix-org/matrix-js-sdk#5202
When we try to load the key storage decryption key from Recovery, but we find that it does not match the public key of the current key storage backup, create a new key storage backup. This means the user no longer has a broken backup, so their historical message keys are being backed up.