-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Hardware key checkbox not disabled while keys are being refreshed #10726
Description
Overview
Starting with version 2.7.7, where the dropdown for hardware keys and key files were replaced with a refresh icon to detect hardware keys and a link to add a file, while it seems that the intent was to make this process smoother by automatically remembering the previous selection (at least for HMAC challenges), it is no longer obvious the authentication isn't ready unless one knows where to look.
Steps to Reproduce
- Click the hardware key refresh icon to detect the hardware key.
- Check the box for the hardware key serial number used with the database to be unlocked.
- Unlock the database.
- Lock the database, note that the hardware key serial number is still shown and selected, and quickly attempt to unlock the database again. *At least in 2.7.8, this step triggers reproduction and one can see that the refresh button is greyed out when the issue will trigger.
- Receive error "Error while reading the database:Unable to calculate the database key: General: Colud not find interface for hardware key with serial number 0. Please connect it to continue."
Expected Behavior
It should be obvious when glancing where the hardware key is listed and shown as selected that it is unavailable prior to attempting to unlock.
Actual Behavior
One has to know to look at the little hardware key refresh button and understand that it is refreshing and therefore not ready if it is greyed out.
Context
Prior to 2.7.7, it was obvious that a key refresh was needed because the dropdown would be blank. I do not know if automatic refresh existed in 2.2.7 or is new for 2.7.8, but I have been manually refreshing after there error in both versions when encountering this in real life scenarios (vs lock-unlock reproduction) because it took coming up with reproduction steps to bring the behavior to my attention.
My intermittent experience with this behavior has occurred on both Windows and macOS for databases with passwords when the key has not been removed. In these scenarios, all databases are locked and KeePassXC has usually been minimized to tray for some period of time. I am not sure if the automatic refresh discussed above doesn't always trigger/work when the database has been locked for an extended period of time without the key being removed or if I am frequently quicker than automatic refresh under these circumstances. In either case, it may be noteworthy that, while it will cause an additional prompt before the error, this is easier to reproduce using the steps above if you create a database that doesn't have a password (so it only requires the HMAC challenge).
KeePassXC - Version 2.7.8
Revision: f6757d3
Metadata
Metadata
Assignees
Labels
Type
Projects
Status