mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-12-02 23:02:41 -08:00
Properly handle Windows Hello errors
The KeyCredentialManager::RequestCreateAsync call can fail because we can end up in a situation where Windows Hello is initially available but then becomes unavailable, such as during a remote desktop session. This commit prevents a crash by moving the call into the try-catch. Fixes #7890 Also resets quick unlock if there is an unrecoverable error. This will not occur if the user merely canceled the Windows Hello dialog.
This commit is contained in:
1 parent
cc35bf2096
commit
b84d38e7fb
3 files changed
+25
-18
No files matched your search
@@ -339,7 +339,12 @@ QSharedPointer<CompositeKey> DatabaseOpenWidget::buildDatabaseKey()
|
||||
#ifdef Q_CC_MSVC
|
||||
if (!getWindowsHello()->getKey(m_filename, keyData)) {
|
||||
// Failed to retrieve Quick Unlock data
|
||||
m_ui->messageWidget->showMessage(tr("Failed to authenticate with Windows Hello"), MessageWidget::Error);
|
||||
auto error = getWindowsHello()->errorString();
|
||||
if (!error.isEmpty()) {
|
||||
m_ui->messageWidget->showMessage(tr("Failed to authenticate with Windows Hello: %1").arg(error),
|
||||
MessageWidget::Error);
|
||||
resetQuickUnlock();
|
||||
}
|
||||
return {};
|
||||
}
|
||||
#elif defined(Q_OS_MACOS)
|
||||
|
||||
Reference in new issue
Block a user