atagen

macltok

public
Star0
Watch0

Commit 419c65426a62

tarball

atagen <boss@atagen.co>2026-10-26 05:46 UTC

1 file changed+3-0
encryption: let only the requesting side start SAS

follow_request started SAS on Ready on both devices, so two macltok sessions each sent m.key.verification.start, collided and cancelled. It only ever worked against Element, which never starts SAS on the side that accepted a request.
Modified file: src/encryption.rs+3 additions
@@ -648,6 +648,9 @@ async fn follow_request(
648648 // created is ours waiting on them, requested is theirs waiting on `Accept`
649649 VerificationRequestState::Created { .. }
650650 | VerificationRequestState::Requested { .. } => {}
651+ // both sides starting SAS collide into a cancel, so like Element the side that
652+ // asked starts and the side that accepted waits for `Transitioned`
653+ VerificationRequestState::Ready { .. } if !request.we_started() => {}
651654 VerificationRequestState::Ready { .. } => match request.start_sas().await {
652655 Ok(Some(sas)) => {
653656 follow_sas(sas, active.clone(), sender.clone()).await;