Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for mismatched passwords BEFORE saving to prevent data loss #1007

Merged
merged 2 commits into from
Sep 29, 2017

Conversation

droidmonkey
Copy link
Member

Description

Fixes #909. Password fields are checked prior to saving to prevent data loss.

Note: Code is repeated due to the way the apply button works (directly calls the save function). This should be refactored in the future.

How has this been tested?

Manually and unit tests.

Types of changes

  • ✅ Bug fix (non-breaking change which fixes an issue)

Checklist:

  • ✅ I have read the CONTRIBUTING document. [REQUIRED]
  • ✅ My code follows the code style of this project. [REQUIRED]
  • ✅ All new and existing tests passed. [REQUIRED]
  • ✅ I have compiled and verified my code with -DWITH_ASAN=ON. [REQUIRED]

if (!passwordsEqual()) {
showMessage(tr("Different passwords supplied."), MessageWidget::Error);
return;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@droidmonkey do you think you can add a test to TestGui::testEditEntry() for that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, on it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@louib ready for you

@droidmonkey droidmonkey merged commit 611a74d into release/2.2.1 Sep 29, 2017
@droidmonkey droidmonkey deleted the hotfix/warn-password-mismatch branch September 29, 2017 22:11
@droidmonkey droidmonkey restored the hotfix/warn-password-mismatch branch October 1, 2017 15:04
droidmonkey added a commit that referenced this pull request Oct 1, 2017
- Corrected multiple snap issues [#934, #1011]
- Corrected multiple custom icon issues [#708, #719, #994]
- Corrected multiple Yubikey issues [#880]
- Fixed single instance preventing load on occasion [#997]
- Keep entry history when merging databases [#970]
- Prevent data loss if passwords were mismatched [#1007]
- Fixed crash after merge [#941]
- Added configurable auto-type default delay [#703]
- Unlock database dialog window comes to front [#663]
- Translation and compiling fixes
@droidmonkey droidmonkey deleted the hotfix/warn-password-mismatch branch October 1, 2017 15:04
@phoerious phoerious added pr: bugfix Pull request that fixes a bug and removed bug labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority 🚨 pr: bugfix Pull request that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants