Skip to content
This repository was archived by the owner on Dec 5, 2020. It is now read-only.

Commit a592638

Browse files
committed
Merge pull request #90: don't send the plaintext xpub for 2FA
5027f68 don't send the plaintext xpub for 2FA (djb)
2 parents 9cb289d + 5027f68 commit a592638

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/qt/dbb_gui.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,11 +1307,13 @@ void DBBDaemonGui::parseResponse(const UniValue& response, dbb_cmd_execution_sta
13071307
} else if (tag == DBB_RESPONSE_TYPE_XPUB_VERIFY) {
13081308
bool sentToWebsocketClients = false;
13091309

1310-
UniValue responseMutable = response;
1310+
UniValue responseMutable(UniValue::VOBJ);
13111311
UniValue requestXPubKeyUV = find_value(response, "xpub");
1312+
UniValue requestXPubEchoUV = find_value(response, "echo");
13121313
QString errorString;
1313-
if (requestXPubKeyUV.isStr()) {
1314+
if (requestXPubKeyUV.isStr() && requestXPubEchoUV.isStr()) {
13141315
//pass the response to the verification devices
1316+
responseMutable.pushKV("echo", requestXPubEchoUV.get_str().c_str());
13151317
if (subtag == DBB_ADDRESS_STYLE_MULTISIG_1OF1)
13161318
responseMutable.pushKV("type", "p2sh_ms_1of1");
13171319
if (subtag == DBB_ADDRESS_STYLE_P2PKH)
@@ -1331,8 +1333,7 @@ void DBBDaemonGui::parseResponse(const UniValue& response, dbb_cmd_execution_sta
13311333
verificationDialog = new VerificationDialog();
13321334

13331335
verificationDialog->show();
1334-
verificationDialog->setData("Verify Your Receiving Address", "No Verification Smartphone Device could be detected, you can verify the address by scanning multiple QRCodes.", response.write());
1335-
1336+
verificationDialog->setData("Verify Your Receiving Address", "No Verification Smartphone Device could be detected, you can verify the address by scanning QRCodes.", responseMutable.write());
13361337
}
13371338
} else if (tag == DBB_RESPONSE_TYPE_LIST_BACKUP && backupDialog) {
13381339
UniValue backupObj = find_value(response, "backup");
@@ -2166,4 +2167,4 @@ void DBBDaemonGui::amountOfPairingDevicesChanged(int amountOfClients)
21662167
DBB::LogPrint("Verification devices changed, new: %d\n", amountOfClients);
21672168
this->statusBarVDeviceIcon->setToolTip(tr("%1 Verification Device(s) Connected").arg(amountOfClients));
21682169
this->statusBarVDeviceIcon->setVisible((amountOfClients > 0));
2169-
}
2170+
}

0 commit comments

Comments
 (0)