keepassxreboot / keepassxc-browser

KeePassXC Browser Extension
GNU General Public License v3.0
1.78k stars 188 forks source link

Login pages with only string fields need action to show "Fill attribute..." context menu option #2058

Open kmantel opened 11 months ago

kmantel commented 11 months ago

Expected Behavior

If a page has any string field form fields present, "Fill attribute..." should be available with no extra actions. Alternatively, if an entry associated with a URL has any string fields "Fill attribute..." should always be available.

Current Behavior

Login pages with only string fields don't have the "Fill attribute..." context menu option until "Fill Username and Password" is clicked. Relevant on sites with a username/password login step, then followed by a security-question-like step.

Possible Solution

I know that I've been on pages with only a TOTP prompt that correctly identified there is a TOTP attribute, maybe other attributes could be detected at this time too.

I know that when clicking "Fill Username and Password" the context menu option is added in kpxc.retrieveCredentialsCallback https://github.com/keepassxreboot/keepassxc-browser/blob/70b2d6c808776b24ceba21b926f3448ac4547c09/keepassxc-browser/content/keepassxc-browser.js#L599-L603 called via https://github.com/keepassxreboot/keepassxc-browser/blob/70b2d6c808776b24ceba21b926f3448ac4547c09/keepassxc-browser/content/keepassxc-browser.js#L908-L912

so maybe it would be possible to call this during some other init step where fields are being detected

Kumm-Kai commented 5 months ago

Just stumbled into this when wanting to only use one String Fields.