Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-Type doesn't detect Pinentry Mac window #1982

Closed
Couto opened this issue May 21, 2018 · 7 comments
Closed

Auto-Type doesn't detect Pinentry Mac window #1982

Couto opened this issue May 21, 2018 · 7 comments

Comments

@Couto
Copy link

Couto commented May 21, 2018

When using the Global Auto-type shortcut on a Pinentry Mac dialog, KeepassXC always display and error saying "Couldn't find an entry that matches the window title:".

This is also reflected when trying to add a new Auto-Type window association, the Pinentry Mac doesn't appear on the list of available windows.

pinentry mac

My database was migrated from macpass, and this feature used to work fine.

Expected Behavior

KeepassXC should fill in the password in the PIN dialog

Current Behavior

KeepassXC states that it could not find an entry that matches the window title, and fallsback to the next window:

screen shot 2018-05-21 at 17 13 40

Possible Solution

Steps to Reproduce (for bugs)

  1. Use Pinentry mac to unlock a GPG key
  2. force an action that requires to use the private key (e.g.: sign a commit in a git repository)
  3. type the global Auto-type shortcut while the cursor is on the PIN field

Context

Debug Info

KeePassXC - Version 2.3.3
Revision: 0a155d8

Libraries:

  • Qt 5.9.3
  • libgcrypt 1.8.2

Operating system: macOS Sierra (10.12)
CPU architecture: x86_64
Kernel: darwin 16.7.0

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • Legacy Browser Integration (KeePassHTTP)
  • SSH Agent
  • YubiKey
@Couto
Copy link
Author

Couto commented May 21, 2018

I can provide more information if needed, but at the moment, I'm not quite sure I know what's the relevant information to share.

@mstarke
Copy link
Contributor

mstarke commented May 22, 2018

Is Pinentry displaying an Icon in the Dock or does it only reside inside the Menubar?

@mstarke
Copy link
Contributor

mstarke commented May 22, 2018

I just took a look at the source of Pinentry and it is indeed only displayed in the menu bar since the LSUIElement key is set to true in the Info.plist.

My guess is the code for getting the active window title is not working for windows of those kinds of apps:

CFArrayRef windowList = ::CGWindowListCopyWindowInfo(kCGWindowListOptionOnScreenOnly | kCGWindowListExcludeDesktopElements, kCGNullWindowID);

The solution might be to use ::CGWindowListCopyWindowInfo(0, kCGNullWindowID); to get all known windows but this needs additional filtering since many windows inside this list aren't of interest to KeePassXC.

I just saw you migrated from MacPass - MacPass uses https://github.com/MacPass/MacPass/blob/9169bd5e5e31f59a8f62d59285f1e294e08657cd/MacPass/MPAutotypeDaemon.m#L268 which might be the solution to the problem.

@ChristopherSchultz
Copy link

ChristopherSchultz commented Aug 24, 2018

This happens to me (misidentified window, KeePassXC 2.3.3) when just logging-into GitHub's website:

  1. Lock your KeePassXC database
  2. Go to https://github.com/ (and logout if necessary)
  3. Click "sign in"
  4. Press the global hotkey for auto-fill

Result:

  1. KeePassXC opens a separate dialog requesting the database password (while showing the main KeePassXC window separately, also with a password-field prominently displayed)
  2. After entering the password and pressing enter, a dialog is shown with this error:
    Couldn't find an entry that matches the window title:
    
    keepass - KeePassXC

Expected: KeePassXC auto-fills the web browser window's form

Note: if the database is already unlocked, the auto-type global hotkey is working as expected.

@ChristopherSchultz
Copy link

Possibly related to issue #947.

@ChristopherSchultz
Copy link

Possibly related to issue #1216

@Couto
Copy link
Author

Couto commented Oct 25, 2019

I'm closing this issue in order to clean up my Issues box.
Feel free to open again if it's relevant.

@Couto Couto closed this as completed Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants