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

Changing a database's key file removes the password #10996

Closed mini-bomba closed 3 days ago

mini-bomba commented 4 days ago

Overview

Changing, adding or removing a key file in the database security page without touching the password section removes the password. Note that the inverse is not true: Changing, adding or removing a password does NOT remove the key file.

Steps to Reproduce

  1. Create a new database for testing with a password configured
  2. In the database security page add a new key file
  3. Click OK at the bottom of the page, an alert about no password being set is shown
  4. Click continue without a password
  5. Lock the database
  6. Attempt to unlock the database with password+keyfile - doesn't work
  7. Attempt to unlock the database with keyfile and no password - works

Expected Behavior

I expected one of the following:

In either of the cases listed above, I expected the database to unlock with a combination of the existing password and the new keyfile, but not with the new keyfile and no password

Actual Behavior

  1. An alert about no password being set appears despite me not touching the password section
  2. The existing database password is removed

Context

I remember that in previous versions of KeePassXC the database password was kept when changing the database keyfile. I do not remember what exact version that was.

KeePassXC - Version 2.7.9 Revision: 8f6dd13

Qt 5.15.14 Debugging mode is disabled.

Operating system: Arch Linux CPU architecture: x86_64 Kernel: linux 6.9.6-zen1-1-zen

Enabled extensions:

Cryptographic libraries:

Operating System: Linux Desktop Env: KDE 6.1 Windowing System: Wayland