matrix-org / matrix-org/matrix-rust-sdk

`reset_identity` edge case when the user has several backup version server side

Open
#4,502 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-Encryption
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.