mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-03-11 08:54:48 +00:00
EditEntryWidget: SSH Agent: Load destination constraints into temporary settings
When using the "Add to agent" button in the SSH Agent category of the entry settings a default KeeAgentSettings structure will be used and filled-in with the current state of the UI elements. As destination contraints are not present in the UI for now those have not been loaded and thus the key was loaded into the SSH agent with no constraints at all. This change fixes it by loading the attachment first before overwriting with the data from the UI elements. Signed-off-by: Konrad Vité <kvite@paktolos.net>
This commit is contained in:
parent
6063508e7a
commit
9ec4deb838
1 changed files with 6 additions and 0 deletions
|
|
@ -734,6 +734,12 @@ void EditEntryWidget::updateSSHAgentKeyInfo()
|
|||
|
||||
void EditEntryWidget::toKeeAgentSettings(KeeAgentSettings& settings) const
|
||||
{
|
||||
// set from attachment to load settings aren't supported by the UI (e.g.
|
||||
// destination constraints)
|
||||
if (KeeAgentSettings::inEntryAttachments(m_attachments.data())) {
|
||||
settings.fromEntryAttachments(m_attachments.data());
|
||||
}
|
||||
|
||||
settings.setAddAtDatabaseOpen(m_sshAgentUi->addKeyToAgentCheckBox->isChecked());
|
||||
settings.setRemoveAtDatabaseClose(m_sshAgentUi->removeKeyFromAgentCheckBox->isChecked());
|
||||
settings.setUseConfirmConstraintWhenAdding(m_sshAgentUi->requireUserConfirmationCheckBox->isChecked());
|
||||
|
|
|
|||
Loading…
Reference in a new issue