re-send a connection token packet if the current one is null

This commit is contained in:
Stephen Birarda 2018-02-02 15:25:43 -08:00
parent eb9d100fc8
commit 7a21ae8d89

View file

@ -393,9 +393,12 @@ SharedNodePointer DomainGatekeeper::processAgentConnectRequest(const NodeConnect
QString verifiedUsername; // if this remains empty, consider this an anonymous connection attempt
if (!username.isEmpty()) {
if (usernameSignature.isEmpty()) {
const QUuid& connectionToken = _connectionTokenHash.value(username.toLower());
if (usernameSignature.isEmpty() || connectionToken.isNull()) {
// user is attempting to prove their identity to us, but we don't have enough information
sendConnectionTokenPacket(username, nodeConnection.senderSockAddr);
// ask for their public key right now to make sure we have it
requestUserPublicKey(username, true);
getGroupMemberships(username); // optimistically get started on group memberships