feat(sdk): Loop over and delete all backup versions on identity reset#6744
feat(sdk): Loop over and delete all backup versions on identity reset#6744kaylendog wants to merge 3 commits into
Conversation
Signed-off-by: Skye Elliot <actuallyori@gmail.com>
f8efc61 to
b2f3c40
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6744 +/- ##
==========================================
- Coverage 89.91% 89.89% -0.02%
==========================================
Files 398 398
Lines 111310 111308 -2
Branches 111310 111308 -2
==========================================
- Hits 100083 100062 -21
- Misses 7420 7437 +17
- Partials 3807 3809 +2 ☔ View full report in Codecov by Harness. |
uhoreg
left a comment
There was a problem hiding this comment.
Looks reasonable, but a couple of nits.
There was a problem hiding this comment.
The doc comment needs updating too
| @@ -0,0 +1 @@ | |||
| Resetting your cryptographic identity now iteratively deletes all server-side key backup versions. | |||
There was a problem hiding this comment.
The change affects more than just resetting. It also affects recover_and_fix_backup and, of course, direct calls to disable_and_delete. If you don't want to list them all, maybe something like "Functions that delete key backups, such as resetting your cryptographic identity, ..."?
218cfb2 to
b461727
Compare
This PR adjusts the identity reset logic to loop on
GET /_matrix/client/v3/room_keys/version, deleting all backups until none remain.When we reset our identity, we delete the current backup version, but not any other versions if they happen to exist. This can leave clients in a broken state where they are unable to enable key backup since one already exists server-side. Deleting all backup versions on reset should fix this issue.
Signed-off-by: Skye Elliot actuallyori@gmail.com