keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
20.01k stars 1.42k forks source link

Fix database password clearing when modifying key file / hardware key #11001

Closed c4rlo closed 3 days ago

c4rlo commented 4 days ago

Fix a bug in the database key settings dialog, where it was previously always incorrectly applying an empty password if the password was not changed but some other change was made (e.g. adding or removing a key file).

Fixes #10996.

I think this bug may have been introduced in #10821, specifically the change to PasswordEditWidget::isEmpty() here.

Testing strategy

Manual testing.

I can try to add an automated test if desired.

Type of change

droidmonkey commented 4 days ago

Ugh and I tested this too... must have screwed myself over. I recommend also adding to the GUI tests for this widget to verify this situation doesn't occur in the future.

droidmonkey commented 4 days ago

@phoerious this bug is a breaker... it could cause the end user to be forced into a no-password database credential. They basically have to edit the database password and set it to the original value to change the key file or hardware key.