matrix-org / matrix-org/matrix-rust-sdk
Disabling and recreating key backup on Web leaves the SDK (EX) in a weird state.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 500
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 106
Description
The SDK detects when the backup is disabled, when re-enabling it, it believes it is enabled until you try to send a message (or maybe receive one that needs to open the key backup?) at which point it believes the backup is disabled again. Choosing to enable the backup fails with
```
2024-10-30T12:38:16.481302Z ERROR elementx: Failed enabling secure backup with error: BackupExistsOnServer | SecureBackupController.swift:91 | spans: root
2024-10-30T12:38:16.482975Z ERROR elementx: Failed enabling key backup with error: failedEnablingBackup | SecureBackupScreenViewModel.swift:77 | spans: root
```
Recording of 2 webs + an EX showing this and how it is handled differently.
https://github.com/user-attachments/assets/c5d2906e-b1e2-4f3f-bc8c-573f1b3ad15a
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 by inspecting the secure-backup flow around SecureBackupController.swift:91 and SecureBackupScreenViewModel.swift:77, then trace how the SDK represents a disabled and recreated backup. Reproduce the sequence shown in the recording and verify that re-enabling succeeds without the SDK reverting to a disabled state when sending or receiving a message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, swift
- Domain
- security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100