Catch exception from the password manager and pretend for now that the password was never saved.
This commit is contained in:
parent
b5ca7099c1
commit
f6c15f895f
1 changed files with 11 additions and 4 deletions
|
|
@ -186,11 +186,18 @@ bool ConnectionController::retrieveConnectionPassword(ConnectionConfig &cc)
|
||||||
|
|
||||||
bool ConnectionController::retrieveFromPasswordManager(const std::string &password_id, const std::string_view &enc_password, std::string &password)
|
bool ConnectionController::retrieveFromPasswordManager(const std::string &password_id, const std::string_view &enc_password, std::string &password)
|
||||||
{
|
{
|
||||||
if (!UnlockPasswordManagerIfNeeded())
|
try
|
||||||
return false;
|
{
|
||||||
|
if (!UnlockPasswordManagerIfNeeded())
|
||||||
|
return false;
|
||||||
|
|
||||||
password = m_passwordManager->decrypt(password_id, enc_password);
|
password = m_passwordManager->decrypt(password_id, enc_password);
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
catch (const PasswordManagerException &ex)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConnectionController::encryptPassword(ConnectionConfig &cc)
|
bool ConnectionController::encryptPassword(ConnectionConfig &cc)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue