matrix-org / matrix-org/matrix-rust-sdk
Unwedging doesn't work if wedged session is new, and first one created for device
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 500
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 106
Description
If
- Alice sends an encrypted to-device message to Bob
- Bob doesn't have any existing Olm sessions with Alice
- the to-device message cannot be decrypted
then Bob will try to mark the Alice as wedged, but AFAICT, `SessionManager.mark_device_as_wedged` won't do anything because it tries to mark a session with Alice as wedged, but there are no existing sessions stored, so nothing can be marked as wedged.
Contributor guide
Research direction
Start at SessionManager.mark_device_as_wedged and trace the path taken when Bob has no stored Olm sessions with Alice. Add coverage for the case where the wedged session is new and the first one created for the device, then verify that marking and subsequent unwedging work as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cryptography, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100