keepassxreboot / keepassxc

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

Cannot use browser extension if "Lock after minimize" is enabled and KeePassXC is in tray/minimized #9880

Open MauroLXX opened 1 year ago

MauroLXX commented 1 year ago

Overview

KeepassXC can't be used for automatic data retrieval if:

Steps to Reproduce

  1. start checking that 'Lock database after minimising the windows' is selected, that KeepassXC is actually minimised in the traybar and that you have more than an account available for the website you're trying to access
  2. open a website login page in which you know you have more than a single account
  3. click on the keepassXC icon on the right side of the login field (should be appear as locked)
  4. digit the master password (or windows Hello password, if activated)
  5. see what happens

Expected Behavior

I expected KeepassXC to unlock provide the option of clicking on an available account, and then lock again.

Actual Behavior

When unlocking KeepassXC from tray, it unlocks but immediately locks again and no time to select anything is given to the user. If more than one account is available in the database, there's no way to choose.

Context

KeePassXC - Version 2.7.6 Revision: dd21def

Operating System: Windows10 Pro 22H2 Build 19045.3448

MauroLXX commented 1 year ago

Here's a brief video of the behaviour. If attaching videos is against any of the rules, please remove it or tell me to remove.

Thankyou

https://github.com/keepassxreboot/keepassxc/assets/65547222/c528b5f2-46b8-4a3a-86b5-3c22fc24c250

droidmonkey commented 1 year ago

What do you have your "Clear clipboard after XX seconds" set to? We already have code to allow for this to work, but it is bounded between 1 and 20 seconds depending on the clipboard setting. I think we need to significantly increase that timeout and not necessarily tie it to the clipboard timeout.

MauroLXX commented 1 year ago

In the previous video I had set up "Clear clipboard after" to 10 seconds and the result was the one you saw.

Now I changed 10 to 999 seconds (KeepassXC accepts 999 as maximum). As you ca see from the next attached video, nothing appears to be changed.

Taking a closer look, the drop-down menu appears correctly, but remains active for only about one second, which is a very short time.

As you can see from my third attempt in the next video, if you are quick enough to select an account, the procedure actually does what expected.

May I express my opinion? I think you should leave the drop-down menu open:

I would introduce the time limit to increase security in case the user leaves the computer unattended, but still allowing him the time to choose which account to use in case the choice is large.

Thank you for attention.

droidmonkey commented 1 year ago

The drop down menu closes because the database locks. Increasing the lock timeout is the only change needed unless there is an issue in the browser integration code itself.

MauroLXX commented 1 year ago

Please note that I tried to set my database lock from 10 to 999 seconds, but nothing actually changed. Drop down menu always closes in 1 second.

At the moment, the only workaround seems to be disabling the "Lock databases after minimising the window" option.

Could you pls let me know: did I forget to upload the second video, or did somebody remove it?

droidmonkey commented 1 year ago

You didn't upload the second video, but it's not necessary. The timeout is capped at 20 seconds so it doesn't matter what you set your clipboard to above that.

MauroLXX commented 1 year ago

I see: 20 secs is max timeout, no matter what I input over it.

However, it has nothing to do with the originally described problem of the drop-down list: it always lasts 1 second.