matrix-org / matrix-org/matrix-rust-sdk
`reset_identity` edge case when the user has several backup version server side
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 500
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 106
Description
As per code the reset flow should:
https://github.com/matrix-org/matrix-rust-sdk/blob/7ec384c61adba9dd51b61c1c0518a313ae646bec/crates/matrix-sdk/src/encryption/recovery/mod.rs#L348-L354
The problem is that if there are several version published on the server, this code will only delete the "current" one.
Then step 4. will fail with BackupExistsOnServer
On the js-sdk there is some code to delete all backup versions
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in crates/matrix-sdk/src/encryption/recovery/mod.rs around lines 348-354 and compare the reset flow with the linked matrix-js-sdk backup.ts implementation. Reproduce the case with several backup versions published on the server, then verify that reset_identity removes all versions so step 4 no longer fails with BackupExistsOnServer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100