ususdei / qute-keepassxc

Qutebrowser userscript to fetch credentials from KeepassXC password database
MIT License
54 stars 10 forks source link

Support KPH: Custom Fields #13

Open ususdei opened 2 years ago

ususdei commented 2 years ago

KeepassXC-Browser plugins allow to associate custom attributes with custom form fields via the KPH: prefix.

But I find the index-based association rather odd. Thus I propose to use the input name as lookup key when filling in the credentials.

So, e.g., when you have a form like

<form>
 ...
  <input type="text" name="branch" maxlength="3" value="" id="branch" autocomplete="off">
</form>

You need do define a custom attribute KPH: branch with the value 123. The KPH name must match the name attribute of the input field (maybe use id as a fallback). This is not how the official browser plugins are doing it and requires the user to dig up the input names using devtools once but I consider it a cleaner solution.