mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-05-25 17:51:08 -04:00
Only remove keys on exit if they would remove on lock (#2985)
* Don't remove keys on app exit that would not be removed due to database locking. * Restores behavior from 2.3.4 * Fixes #2980
This commit is contained in:
parent
bc5173bac7
commit
cc27a367d6
1 changed files with 5 additions and 2 deletions
|
@ -45,8 +45,11 @@ SSHAgent::~SSHAgent()
|
||||||
{
|
{
|
||||||
auto it = m_addedKeys.begin();
|
auto it = m_addedKeys.begin();
|
||||||
while (it != m_addedKeys.end()) {
|
while (it != m_addedKeys.end()) {
|
||||||
|
// Remove key if requested to remove on lock
|
||||||
|
if (it.value()) {
|
||||||
OpenSSHKey key = it.key();
|
OpenSSHKey key = it.key();
|
||||||
removeIdentity(key);
|
removeIdentity(key);
|
||||||
|
}
|
||||||
it = m_addedKeys.erase(it);
|
it = m_addedKeys.erase(it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue