keepassxreboot / keepassxc

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

2.7.7: Auto-Type doesn't use correct window when database needs to be unlocked #10439

Closed Kurash-Rex closed 6 months ago

Kurash-Rex commented 8 months ago

Overview

Installed KeePassXC 2.7.7 on Windows 10 and was unable to use the Global Auto-Type shortcut to auto-type passwords into website in Chrome. When typing master password into KeePassXC focus slips from username field in Chrome

Steps to Reproduce

  1. launch Chrome
  2. visit website with login (e.g. bank)
  3. place cursor in username field
  4. type Global Auto-Type shortcut
  5. enter master password
  6. all passwords are shown
  7. search for correct password
  8. press enter
  9. username/password are not entered into webpage

Expected Behavior

Only passwords whose Auto-Type settings match should be listed. Username/password is entered into username and password fields based on auto-type sequence

Actual Behavior

In most instances all passwords are listed and correct username/password must be searched for After finding correct username/password entry entry and hitting enter, username and password fields are not filled in as focus is no longer on username field

Context

Every webiste I tried for which I have a login via Chrome

KeePassXC - 2.7.7 Revision: latest as of 3-13-2024 Reverted to Version 2.7.6 Revision: dd21def to restore functionality

Operating System: Microsoft Windows 10 Home Version 10.0.19045 Build 19045 Windows default UI

Chrome Version 122.0.6261.129 (Official Build) (64-bit)

droidmonkey commented 8 months ago

username and password fields are not filled in as focus is no longer on username field

Is focus lost when you alt+tab manually between windows? This is most likely a problem with the website and certainly not a keepassxc problem.

Your other problem with the list not being filtered is already reported and being fixed.

Kurash-Rex commented 8 months ago

Lost focus is likely a poor choice of words. With 2.7.6 after placing the curson in the username field and switching to KeePassXC via the Global Auto-Type shortcut, the curson is still in the username field after selecting the current entry in KeePassXC. When I had 2.7.7 installed the cursor is no longer in the username field when KeePassXC switches back to Chrome. It seems like 2.7.7 steals or redirects the focus from Chrome. Using Alt-Tab does not exhibit this behavior with 2.7.6 installed.

droidmonkey commented 8 months ago

We didn't make any changes to autotype window switching, so it's not likely that this is on us. I also don't have this problem on any website or application I have used 2.7.7 auto-type on. Using Windows 11 23H2 btw.

Kurash-Rex commented 8 months ago

I believe the best next step would be for me to check for the auto-type window switching behavior after a patch for the filtering issue is released. I understand what you are saying in regard to the behavior you are seeing and that no were made to the feature I may be having an issue with.

droidmonkey commented 8 months ago

Please answer the question on whether alt+tab between windows also results in loss of focus for this particular website. If you can tell me what website it is then I can try to replicate as well.

Kurash-Rex commented 8 months ago

Ah, with respect to Alt-Tab I answered in regard to 2.7.6 (where focus, field selection, is retained when switching away and back), but not for 2.7.7. I will reinstall 2.7.7 and check the Alt-Tab behavior.

I tried other websites, Tower FCU (towerfcu.org) being the one I recall at the moment.

droidmonkey commented 8 months ago

The keepassxc version won't change alt tab results

Kurash-Rex commented 8 months ago

Reinstalled 2.7.7 and verified reported behavior.

  1. uninstall Version 2.7.6 Revision: dd21def
  2. install Version 2.7.7 Revision: 68e2dd8
  3. open Chrome Incognito window
  4. go to https://www.towerfcu.org/
  5. click Login
  6. place cursor in Username field
  7. type Global Auto-Type shortcut
  8. enter master password
  9. unfiltered entry list is displayed
  10. search for and select correct entry
  11. press enter
  12. upon return to Chrome Username and Password are not populated and cursor is no longer in Username field

Revert to 2.7.6 and repeat the above steps. Username and Password fields are populated as expected.

droidmonkey commented 8 months ago

What is your global auto type shortcut so I can replicate fully?

Kurash-Rex commented 8 months ago

Global Auto-Type shortcut: Ctrl-Alt-P

droidmonkey commented 8 months ago

OK I can replicate your issue and I think the same problem that causes the results to not be filtered is also causing a focus issue.

LinuxOnTheDesktop commented 8 months ago

Data-point: I have the same problem, albeit intermittently (or only on some sites?) and it started with KeePassXC 2.7.7, on Firefox on Windows 10.

droidmonkey commented 8 months ago

I figured out the problem. I suspect this was caused by an update in Qt because we didn't touch anything regarding the code that I modified to fix it just now. Thank you for the reports!

LinuxOnTheDesktop commented 8 months ago

@droidmonkey : well, thank you for the (forthcoming) fix!

robpaolella commented 8 months ago

I am having this same issue with every window I try to do auto-type on. It asks for my facial recognition, shows me a list of all possible entries, I select the right one, it asks for facial recognition again, and then it cancels the auto-type. I hit the auto-type hotkey again and it then gives me the sole result I'm looking for.

droidmonkey commented 8 months ago

yes this is the issue and as mentioned above I have fixed it for 2.7.8

jolyfra commented 8 months ago

I found this discussion, because I noticed the same issue with 2.7.7 under Windows 10, thank you for the fix to come. I would like to take this opportunity to suggest that you check when using the Windows virtual desktop with Ctrl+Win+Left or Right, this regression had already partially appeared with 2.7.6 when the main KPXC window have to be unlocked on another desktop view!

Gittyperson commented 7 months ago

I don't know if this is related, but it's a few weeks (or months) that 6 out of 10 times, hitting the Global Auto-type shortcut ( Ctrl+Alt+\ ) will NOT properly detect the current browser window, and simply bring up all entries. Trying a second time almost always works as expected.

Windows 10, Pale Moon and Firefox browsers, KeePassXC 2.7.7

Kurash-Rex commented 7 months ago

@Gittyperson, yes that is the problem this bug report refers to, reverting to 2.7.6 should resolve the issue for you. Wait for 2.7.8 to be released in which the issue has been resolved.

Gittyperson commented 7 months ago

Thanks, @Kurash-Rex. By the way and unrelated to this issue, does Auto-Type work as-is in Chromium browsers without browser extensions? Asking because the few times I tried it with Brave and Edge, it just did not work. Entries would not auto-fill and my configurations created mostly for Pale Moon (and working on Firefox) did not work on these browsers. It seemed like the boxes to be filled were being skipped and as if it was trying to fill into non-fillable locations. Or as if Auto-Type was being blocked by the browser.

Kurash-Rex commented 7 months ago

Not sure, I follow you. If you are referring to Auto-Type in 2.7.7 I would suspect that it would not work, but I'm not certain. I've also never used the browser plugins. Once I confirmed the problem and did a few extra checks for droid-monkey, I removed 2.7.7 and plan to stick with 2.7.6 until 2.7.8 is released. Sorry, I could be more help.

LinuxOnTheDesktop commented 7 months ago

reverting to 2.7.6 should resolve the issue for you. Wait for 2.7.8 to be released in which the issue has been resolved.

I will myself revert to 2.7.6. However, I would have thought that the problem is serious enough to entail (given that in master the problem has been fixed) a rapid release of a fixed version. EDIT: I find that. on Windows, to install an older version one must remove the newer version first.

droidmonkey commented 7 months ago

This problem is not a breaker. If you unlock your database first then perform auto-type everything works fine. Or just do autotype, unlock, search.