mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 08:49:42 -05:00
Check for mismatched passwords BEFORE saving to prevent data loss
This commit is contained in:
parent
59786d7bd7
commit
de5f8082de
@ -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…
Reference in New Issue
Block a user