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 : Differentiate by parent window #412

Closed
eNTi opened this issue Mar 18, 2017 · 4 comments
Closed

Auto-Type : Differentiate by parent window #412

eNTi opened this issue Mar 18, 2017 · 4 comments

Comments

@eNTi
Copy link

eNTi commented Mar 18, 2017

I want auto-type to realize the difference between the "Enter Password" window from Firefox and Thunderbird. They use the same title for the window (instead of adding the name of the program) and such I have to select one entry from a liste each time I (re-)start one of those programs. It's a minor annoyance but it adds up.

Expected Behavior

Make an option or use the parent window info by default to distinguish between windows with the same title.

Current Behavior

Window pops up that asks me to select an entry.

Possible Solution

Check for the parent (Name?) and use this as an additional identifier.

Context

I would like more automation on an already automated tasks.

Your Environment

  • KeePassXC version 2.1.2 (package community/keepassxc 2.1.2-2)
  • Qt version 5.8
  • Manjaro package (I guess it's gcc)
  • Linux eNTi 4.9.13-1-MANJARO # 1 SMP PREEMPT Sun Feb 26 13:27:28 UTC 2017 x86_64 GNU/Linux
@Francewhoa
Copy link

Any volunteer for a patch for this?

Both me and the Ubertus team would be happy to contribute testing and documentation if needed

@Francewhoa
Copy link

Francewhoa commented Dec 12, 2020

Suggested Collaboration Between HostnameTitleBar & KeePassXC

Hello @Aaron-P, @droidmonkey, @eNTi, @phoerious and all interested contributors :) For those using KeePassXC, schmittlauch suggested a new feature for KeePassXC. Which would automatically match the HTTP Basic Auth (HBA) in-window modal with its window title dialogue's parent window.

In other words, this suggested resolution could potentially allow both HostnameTitleBar & KeePassXC addons to collaborate toward resolving this challenge in those two tickets #412 & Aaron-P/HostnameTitleBar#2.

Scenario

  1. Using Firefox 78+, user go to this test page at https://www.httpwatch.com/httpgallery/authentication/#showExample10
    HostnameTitleBar automatically customize this above page window title. HostnameTitleBar is already able to do this. Including automatically injecting a window title into pages that don't have one. So that all pages can both be unique & easily targeted by KeePassXC.
    The number 2 in this mockup below shows this. In this example, HostnameTitleBar injected the prefix title https://mozilla.org. Which as you know is a unique URL.
    mockup---match_hba_in-window_modal_with_parent---v1
  2. User click on the "DISPLAY IMAGE" button. Which triggers the opening of this HTTP Basic Auth (HBA) in-window modal below.
    The number 3 in this mockup below shows this.
    mockup---match_hba_in-window_modal_with_parent---v1
  3. The challenge is that Firefox changed the way HBA work to make them in-window modals instead of system modals. Notice that this HBA in-window modals that just opened above does not have a title bar.
  4. To resolve this challenge, KeePassXC would check for the parent window title. In this example, https://www.httpwatch.com/httpgallery/authentication/#showExample10
    Then KeePassXC would use this as an additional identifier. Which in turn would allow KeePassXC to automatically match each HBA in-window modal with its parent page. In other words, this suggested resolution would use the parent window info by default to distinguish between windows either without name or with the same title.

Alternative

Alternatively, if somehow a collaboration is not realistic, both HostnameTitleBar & KeePassXC are with open source licenses. Maybe part of their code could be use and adapted? So that both HostnameTitleBar & KeePassXC could independently resolved this challenge with HBA in-window modals.

Attribution

Thanks to @Aaron-P who identifed the source of the challenge about Firefox changed the way HBA work to make them in-window modals instead of system modals at Aaron-P/HostnameTitleBar#2 (comment)

Thanks to both @eNTi and @schmittlauch who suggestied the resolution about KeePassXC matching the HBA modal with its window title dialogue's parent window at #412 & #1376.

@droidmonkey
Copy link
Member

We are not likely to work on this issue anymore with the upcoming improvements to the Auto-Type selection dialog. You can now search the open databases for the entry you want.

@droidmonkey
Copy link
Member

For reference, though, this Win32 API retrieves the parent window and could be used to find title information: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getwindow

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