From 33f3ccd6aef0a3ef3a37fefead208c6249169142 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Wed, 23 Apr 2025 16:46:58 +0100 Subject: [PATCH] crypto/verification: add missing lock in `AcceptVerification` method --- crypto/verificationhelper/verificationhelper.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crypto/verificationhelper/verificationhelper.go b/crypto/verificationhelper/verificationhelper.go index 550df942..8d99dacc 100644 --- a/crypto/verificationhelper/verificationhelper.go +++ b/crypto/verificationhelper/verificationhelper.go @@ -378,6 +378,9 @@ func (vh *VerificationHelper) StartInRoomVerification(ctx context.Context, roomI // be the transaction ID of a verification request that was received via the // VerificationRequested callback in [RequiredCallbacks]. func (vh *VerificationHelper) AcceptVerification(ctx context.Context, txnID id.VerificationTransactionID) error { + vh.activeTransactionsLock.Lock() + defer vh.activeTransactionsLock.Unlock() + log := vh.getLog(ctx).With(). Str("verification_action", "accept verification"). Stringer("transaction_id", txnID).