From 1e412572b7474db1c478cb98f49e2f9b45993e1e Mon Sep 17 00:00:00 2001
From: "Richard T. Carback III" <rick.carback@gmail.com>
Date: Tue, 25 Jan 2022 20:23:45 +0000
Subject: [PATCH] fix bug on ownership proofs when users attempt to request
 auth channels at the same time

---
 auth/callback.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/auth/callback.go b/auth/callback.go
index 471d415a8..d6414bfa3 100644
--- a/auth/callback.go
+++ b/auth/callback.go
@@ -227,6 +227,10 @@ func (m *Manager) handleRequest(cmixMsg format.Message,
 				_, _, partnerContact, _ := m.storage.Auth().GetRequest(partnerID)
 				m.storage.Auth().Delete(partnerID)
 
+				// Use the public key sent to me, not the one I
+				// first retrieved to initiate the auth request
+				partnerContact.DhPubKey = partnerPubKey
+
 				// add a confirmation to disk
 				if err = m.storage.Auth().AddReceived(partnerContact,
 					partnerSIDHPubKey); err != nil {
-- 
GitLab