mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-07 06:27:39 +03:00
Check for mismatched passwords BEFORE saving to prevent data loss
This commit is contained in:
parent
59786d7bd7
commit
de5f8082de
1 changed files with 6 additions and 0 deletions
|
@ -446,6 +446,12 @@ void EditEntryWidget::saveEntry()
|
|||
|
||||
void EditEntryWidget::acceptEntry()
|
||||
{
|
||||
// Check if passwords are mismatched first to prevent saving
|
||||
if (!passwordsEqual()) {
|
||||
showMessage(tr("Different passwords supplied."), MessageWidget::Error);
|
||||
return;
|
||||
}
|
||||
|
||||
saveEntry();
|
||||
clear();
|
||||
emit editFinished(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue