From bbf678975fb15eaa3367cbdeb14440fd13423fe2 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Sun, 24 Feb 2019 18:31:55 -0500 Subject: [PATCH] Fix TouchID operation after database refactor * Fix #2720 --- src/gui/DatabaseOpenWidget.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/DatabaseOpenWidget.cpp b/src/gui/DatabaseOpenWidget.cpp index 96be7dc1e..155846640 100644 --- a/src/gui/DatabaseOpenWidget.cpp +++ b/src/gui/DatabaseOpenWidget.cpp @@ -251,7 +251,11 @@ QSharedPointer DatabaseOpenWidget::databaseKey() #ifdef WITH_XC_TOUCHID // check if TouchID is available and enabled for unlocking the database - if (m_ui->checkTouchID->isChecked() && TouchID::getInstance().isAvailable() && masterKey->isEmpty()) { + if (m_ui->checkTouchID->isChecked() && TouchID::getInstance().isAvailable() + && m_ui->editPassword->text().isEmpty()) { + // clear empty password from composite key + masterKey->clear(); + // try to get, decrypt and use PasswordKey QSharedPointer passwordKey = TouchID::getInstance().getKey(m_filename); if (passwordKey != NULL) {