From d70a474bacbf531f1e7a7bb020b97f5a5e7a3be5 Mon Sep 17 00:00:00 2001 From: varjolintu Date: Tue, 7 Aug 2018 08:27:19 +0300 Subject: [PATCH] Allows a separate ID key for browser extension association --- src/browser/BrowserAction.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/browser/BrowserAction.cpp b/src/browser/BrowserAction.cpp index 96090258a..78ca53c1e 100755 --- a/src/browser/BrowserAction.cpp +++ b/src/browser/BrowserAction.cpp @@ -169,7 +169,9 @@ QJsonObject BrowserAction::handleAssociate(const QJsonObject& json, const QStrin QMutexLocker locker(&m_mutex); if (key.compare(m_clientPublicKey, Qt::CaseSensitive) == 0) { - const QString id = m_browserService.storeKey(key); + // Check for identification key. If it's not found, ensure backwards compatibility and use the current public key + const QString idKey = decrypted.value("idKey").toString(); + const QString id = m_browserService.storeKey((idKey.isEmpty() ? key: idKey)); if (id.isEmpty()) { return getErrorReply(action, ERROR_KEEPASS_ACTION_CANCELLED_OR_DENIED); }