keepassxreboot / keepassxc

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

Move Fingerprint window to front of screen #10175

Open ElizabethWhyman opened 10 months ago

ElizabethWhyman commented 10 months ago

Overview

Since the last update, once the password is entered, the second (Fingerprint dialog box) doesn't have focus but remains hidden behind the main window.

Steps to Reproduce

  1. Enter password
  2. Minimize main window
  3. Find fingerprint dialog and enter fingerprint

Expected Behavior

Enter password Fingerprint window comes to fore, enter fingerprint Continue with life

Actual Behavior

once the password is entered, the second (Fingerprint dialog box) doesn't have focus but remains hidden behind the main window.

KeePassXC - Version 2.7.6 Revision: dd21def

Qt 5.15.10 Debugging mode is disabled.

Operating system: Windows 11 Version 2009 CPU architecture: x86_64 Kernel: winnt 10.0.22631

Enabled extensions:

Cryptographic libraries:

Operating System: Windows Windowing System: X11

droidmonkey commented 10 months ago

Hello, we do attempt to move the fingerprint window to the front. If it takes longer than 2 seconds to appear for you, then we will give up trying to find it. Is that the case in your situation?

Relevant code here: https://github.com/keepassxreboot/keepassxc/blob/7bfe9065cf3a7b9e32094d965eb13a8c7fc0cc82/src/quickunlock/WindowsHello.cpp#L46

ElizabethWhyman commented 10 months ago

Yes, it never comes to the front. The main window just continues to show the spinner. Maybe this is an issue since the update of my Dell laptop then, rather than KeyPass XC. They tend to mess up a couple of things per update. I'll just put up with it then. :-)

droidmonkey commented 10 months ago

Do you mind posting a screenshot of the fingerprint window? I wonder if Dell introduced a custom one that is overriding the default Windows version.

ElizabethWhyman commented 10 months ago

Sure. image

droidmonkey commented 10 months ago

Ok that is the standard one. Not sure why it's not working for you 😕.

cnmicha commented 10 months ago

Same issue here every now and then, Windows 11 23H2, KeePassXC 2.7.6. I didn't figure out yet how to reproduce the issue.

cnmicha commented 10 months ago

@droidmonkey I am able to reproduce the issue as following:

  1. Connect the Firefox browser extension to KeePassXC
  2. Setup KeePassXC such that it locks the database when locking the screen in Windows, and configure fingerprint unlock via Windows Hello
  3. Unlock the database (enter the master password)
  4. Lock the screen in Windows (KeePassXC will lock the database)
  5. Enter your Windows account password to unlock the screen
  6. In Firefox, open a website with a login form
  7. Click on the grey-colored KeePassXC icon in the username field: image
  8. KeePassXC will move itself into the foreground, showing the "Unlock database" button with the fingerprint icon and the "Cancel" button (I cannot take a screenshot due to the security policy). It will also open the Windows Hello window for fingerprint entry (screenshot see above). However, the Windows Hello Window is not put to foreground and needs to be manually opened by clicking the icon in the task bar.

I only tested it with Firefox, the issue may also exist with Chrome.

droidmonkey commented 10 months ago

Only step 8 matters, there is no functional difference between calling up the unlock dialog for browser or Auto-Type. Also no difference between browsers. This is simply a matter of either timing or Microsoft renamed the unlock dialog so we cannot find it anymore with our hack. I have the latest win11 and this doesn't happen to me so I doubt a naming issue is present.

Mitch-Altman commented 6 months ago

The moment i put in my database master key it will show a spinning cursor and i see in my taskbar that a orange flashing 'windows hello' prompt is waiting to be opened but is not on the foreground:

image

Then when i open this Windows Hello prompt and click on the OK button:

image

Than it will close after the OK button is clicked, nothing happens in KeepassXC and i see the orange flashing again in the same way as discribed above, so click in the taskbar again on the flashing icon, it opens the windows hello again but now it says in dutch, color yellow; Something went wrong, try again :

image

This process keeps repeating itself until i hit the cancel button in the windows hello prompt and it logs me into keepassxc. Then on the top of the keepassxc window i see this message:

image

But it still is enabled..

The work around is or disabling the windows hello feature, or click the cancel button in the prompt... Hope this helps with finding the issue

droidmonkey commented 6 months ago

@Mitch-Altman you have a windows hello registration problem, you need to re-register windows hello in general. When you see an error in the Hello dialog, that is not from KeePassXC.

Mitch-Altman commented 6 months ago

@Mitch-Altman you have a windows hello registration problem, you need to re-register windows hello in general. When you see an error in the Hello dialog, that is not from KeePassXC.

I understand, but why is KeepassXC the only, and i repeat, the only program that i have this problem..

Windows Hello works with all the other apps on my computer; open source, third party, you name it. Everything works fine, but this one doesn't?!

Does a re-register of Windows Hello fix a problem that i only have with one program? Because it should give my this issue all the time when Windows Hello should be prompted and it should also give me this issue with other programs.

Not trying to be a smart ass over here, so don't get me wrong. But re-register windows hello aint the issue solver

droidmonkey commented 6 months ago

It helped solve problems before, that looked exactly like what you posted above.

achernyakevich-sc commented 6 months ago

I tried to update to the 2.7.8 (I use portable version on Windows 10). As result when I open database in KeepassXC 2.7.8 and fill master password the first time then it doesn't ever ask about fingerprints. So further every time to unlock database I need to enter password. Practically it just has turned off using of fingerprints... :(

KeepassXC 2.7.7 from sibling folder behave as needed - ask fingerprints after first time master password and provide possibility to unlock database further when it is locked. The same problem I have on my MacBook Pro (Ventura, KeepassXC 2.7.8 installed using Homebrew).

JohnLGalt commented 6 months ago

Did you copy the config folder over from the sibling folder?

I use KPXC portable as well, on Windows, and the older \config does not come with the portable archive, and in my case contains 2 files, keepassxc.ini and keepassxc_local.ini - I suspect some similar folder structure is there in your install(s) as well.

achernyakevich-sc commented 6 months ago

Thanks to @droidmonkey who helped me to resolve the issue. It is not actual anymore.

About \config fodler - yes, I have it, it contains to files. It is not a part of a distribution archive so it help to keep earlier configured (my migration approach is - remove everything except \config folder and unpack archive). By experiments I detected that keepassxc.ini looks overwritten when after first run of new version (look like storage of default settings). keepassxc_local.ini contains my settings that are not the same as default.