Skip to content

Commit

Permalink
Fix TouchID operation after database refactor
Browse files Browse the repository at this point in the history
* Fix #2720
  • Loading branch information
droidmonkey committed Feb 25, 2019
1 parent d0d1b25 commit bbf6789
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/DatabaseOpenWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,11 @@ QSharedPointer<CompositeKey> 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<QByteArray> passwordKey = TouchID::getInstance().getKey(m_filename);
if (passwordKey != NULL) {
Expand Down

0 comments on commit bbf6789

Please sign in to comment.