Skip to content

Add warning for leading/trailing spaces in password - #13724

Open
Litschi21 wants to merge 2 commits into
keepassxreboot:developfrom
Litschi21:feature/11023-warn-for-leading-trailing-spaces-in-password
Open

Litschi21 wants to merge 2 commits into
keepassxreboot:developfrom
Litschi21:feature/11023-warn-for-leading-trailing-spaces-in-password

Conversation

@Litschi21

Copy link
Copy Markdown

Added a warning message box if the password has been modified (to avoid double warnings) and there is a space at the beginning and/or end of the password (leading/trailing spaces).

Fixes #11023

Screenshots

image Pressing "Yes" here would remove them (trim the password) while "No" continues to saving.

Testing strategy

I tested it with both new and existing entries as well as making sure that it does not ask twice when the password has not been modified. All tests pass.

Type of change

  • ✅ New feature (change that adds functionality)

@droidmonkey

Copy link
Copy Markdown
Member

Use our wrapper around QMessageBox, MessageBox

@droidmonkey droidmonkey added the pr: new feature Pull request adds a new feature label Sep 29, 2026
@droidmonkey droidmonkey added this to the v2.8.1 milestone Sep 29, 2026
@Litschi21

Copy link
Copy Markdown
Author

@droidmonkey The test coverage fail is from a test that I seemingly do not have locally, which I find odd, including there being 51 tests in the test suite and only 46 locally. I would suggest having them match to make the process of pull requests more efficient. Where exactly do I even find out why this specific test failed?

Also, running make format in the build directory changes a lot of things in unrelated files, most of which are just adding a space between closing parentheses and starting squiggly brackets in class definitions. I am fairly certain this is unwanted. Should I just commit it with these changes as well or manually undo them?

@droidmonkey

droidmonkey commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Just stop work, we will take it from here. Suggest you update your llvm tools, specifically clang_format

You may need to add -DWITH_GUI_TESTS=ON to your cmake configure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: new feature Pull request adds a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warn user if spaces at beginning or end of passwords and username on edit

2 participants