Kunzisoft / KeePassDX

Lightweight vault and password manager for Android, KeePassDX allows editing encrypted data in a single file in KeePass format and fill in the forms in a secure way.
https://www.keepassdx.com/
GNU General Public License v3.0
4.34k stars 262 forks source link

Autofill in chrome (or some chrome based browsers) #551

Closed AJJLagerweij closed 3 years ago

AJJLagerweij commented 4 years ago

Describe the bug My chrome browser does not seem to find any autofill fields whereas firefox (focus and preview) browser does for the same website.

To Reproduce Steps to reproduce the behaviour:

  1. Open in a url for which an autofill is setup with firefox and chrome
  2. Ony in firefox, I see the autofill option, not in chrome

Expected behaviour I expected that Autofill would work on (all) mainstream browsers.

Keepass Database

KeePassDX (please complete the following information):

Android (please complete the following information):

Additional context Add any other context about the problem here.

J-Jamet commented 3 years ago

Indeed, I just tested and K2A get the WebDomain, I will try to find out how it does! thank you for the info

J-Jamet commented 3 years ago

OK, honestly I don't know why it works with K2A and not with KPDX.

The webDomain is retrieved the same way: https://github.com/PhilippC/keepass2android/blob/555109c2439f0479a84950cca4fc6497623cecf5/src/keepass2android/services/AutofillBase/StructureParser.cs#L259

But on KeePassDX, the value I get is allways null with Chrome. https://github.com/Kunzisoft/KeePassDX/blob/454561c2a1b0e0840f314e7a36344b79959763ca/app/src/main/java/com/kunzisoft/keepass/autofill/StructureParser.kt#L71

If anyone knows why, please enlighten me.

cloudy-dev commented 3 years ago

I have no idea why it doesn't work in this app. Autofill in Chrome also works with the Bitwarden Android app, so maybe there are some hints in their codebase.

https://www.github.com/bitwarden/mobile/tree/master/src%2FAndroid%2FAutofill

J-Jamet commented 3 years ago

OK, I found the reason. In KeePassDX the code is optimized to parse only the wanted content of a form and is stopped when the desired values ​​are retrieved. But on some browsers in compatibility mode (the new Chrome app), the recovery of the WebDomain is done at the end of the content, so here was not parsed. I will therefore be able to correct the problem for the next version! :)

Note: This will make it easier to complete the forms by activating the auto search, but it will still not be possible to save new elements with the applications in compatibility mode.

auanasgheps commented 3 years ago

Hurray! This was one of the last points where KeePass2Android was still ahead.

cloudy-dev commented 3 years ago

This is so awesome, thanks so much for your work! <3

hshalexgwamf7d3vlblvbqd971ii6o commented 3 years ago

Why close this issue? The issue was not fixed at all. Autofill is still not triggering on chromium-based browsers.

J-Jamet commented 3 years ago

I have tested many times and I no longer have problems on all my devices. Are you sure you are on version 2.9?

J-Jamet commented 3 years ago

I added the known information to the Wiki https://github.com/Kunzisoft/KeePassDX/wiki/AutoFill#web-browser-recognition

csagan5 commented 2 years ago

Bromite will now have native Android autofill support starting from version 94.0.4606.109; I edited the wiki page to mention this.