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

Non-working site: Hungary's main governmental Central Authentication Agent (Központi Azonosítási Ügynök, KAÜ) IDP (https://idp.gov.hu/) #2396

Closed
dhanak opened this issue Dec 4, 2024 · 6 comments · Fixed by #2418

Comments

@dhanak
Copy link

dhanak commented Dec 4, 2024

This page is the central login page for all Hungarian governmental sites for digital citizens. It has been revamped recently, and it now completely confuses keepassxc-browser.

Exact login URL and the URL of your entry or entries.

Go to https://magyarorszag.hu, switch to English (upper right corner), then click "Login" (on the left side). On the appearing page, choose "Client gate". The appearing page now displays in Hungarian, but the upper input field is the username, the lower is the password field. These fields are completely undetected.

Dump of console output from the page (Firefox: Tools -> Browser Tools -> Web Developer Tools / Chromium-based: Tools -> Developer -> Javascript Console). Do this only if there's KeePassXC-Browser related output.

[Debug keepassxc-browser.js:230] KeePassXC-Browser - Input fields found: [global.js:139:13](moz-extension://ac0da6e0-6165-41c1-a027-f889bc903d09/common/global.js)
Array []
[global.js:142:17](moz-extension://ac0da6e0-6165-41c1-a027-f889bc903d09/common/global.js)
[Debug keepassxc-browser.js:230] KeePassXC-Browser - Input fields found: [global.js:139:13](moz-extension://ac0da6e0-6165-41c1-a027-f889bc903d09/common/global.js)
Array []
[global.js:142:17](moz-extension://ac0da6e0-6165-41c1-a027-f889bc903d09/common/global.js)
[Debug fields.js:199] KeePassXC-Browser - Input fields found: [global.js:139:13](moz-extension://ac0da6e0-6165-41c1-a027-f889bc903d09/common/global.js)
Array []
[global.js:142:17](moz-extension://ac0da6e0-6165-41c1-a027-f889bc903d09/common/global.js)
[Debug keepassxc-browser.js:230] KeePassXC-Browser - Input fields found: [global.js:139:13](moz-extension://ac0da6e0-6165-41c1-a027-f889bc903d09/common/global.js)
Array []
[global.js:142:17](moz-extension://ac0da6e0-6165-41c1-a027-f889bc903d09/common/global.js)
[Debug keepassxc-browser.js:230] KeePassXC-Browser - Input fields found: [global.js:139:13](moz-extension://ac0da6e0-6165-41c1-a027-f889bc903d09/common/global.js)
Array []
[global.js:142:17](moz-extension://ac0da6e0-6165-41c1-a027-f889bc903d09/common/global.js)
[Debug fields.js:199] KeePassXC-Browser - Input fields found: [global.js:139:13](moz-extension://ac0da6e0-6165-41c1-a027-f889bc903d09/common/global.js)
Array []

Have you tried Username-Only Detection, choosing Custom Fields etc.

Yes. Nothing helps. Choosing custom fields is not even possible, as the add-on doesn't register my clicking on the field. Choosing "Fill username + password" from the context menu doesn't do anything either.

Are you using Autofill instead of the manual one.

No.

Does it affect the Username Icon, Autocomplete Menu, Popup Menu?

No icon is displayed in the field. The popup menu works, but the entries don't type anything.

Version 1.8.0 and later, enable Debug Logging from the settings and inspect the pages's JavaScript console. It should show all input fields detected.

See above, no fields are detected.

(Related to #2386)

@varjolintu
Copy link
Member

They are using DAP-DS-PASSWORD-INPUT custom elements inside the form that has the actual input fields underneath. Even tried a custom selector with '[type=text], [type=password]' but it only finds the password field.

@meskobalazs
Copy link

I've just tried this in Firefox and Chrome, it fails in both. This must be related to their use of Shadow DOM, as mentioned by @varjolintu

By the way, as a side-note, Shadow DOM also breaks the built-in autocompletion in Firefox, see this bug and this metabug.

@varjolintu
Copy link
Member

Those kind of bugs could explain it why the browser itself cannot find the fields via querySelctorAll().

@indivisible
Copy link

You can get one step further by adding an entry to "site preferences" in the addon settings, and checking "Improved Input Field Detection". This enables it to detect fields in the shadow dom, but...

There's one more hurdle: for some reason the addon completely ignores span elements, which the input fields are children of

Any dev knows why it does that? I'd wager that this breaks lots of random sites

@varjolintu
Copy link
Member

@indivisible That's exactly the reason why many queries fail.

@indivisible
Copy link

looking at the code I did notice a few things that could improve compatibility:

  1. removing the span and maybe a tags from the ignore list. Probably even SVG, as that's perfectly valid too
  2. automatically using the "improved input field detection" on user interaction, like the rescan fields button or a context-menu action. Maybe it should become the default since shadow dom is getting wider use
  3. is this right? is there a reason for only processing the first element in events?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants