Skip to content

Commit

Permalink
Check for mismatched passwords BEFORE saving to prevent data loss
Browse files Browse the repository at this point in the history
  • Loading branch information
droidmonkey committed Sep 29, 2017
1 parent 59786d7 commit de5f808
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/entry/EditEntryWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit de5f808

Please sign in to comment.