palant / pfp

A simple and secure browser extension to be used with KeePass databases.
https://pfp.works/
Mozilla Public License 2.0
113 stars 14 forks source link

In password confirmation forms, I need to fill the form with PfP twice #114

Closed ghost closed 4 years ago

ghost commented 4 years ago

Most pages, when you try to change your password have you enter the new password twice, the second one as a confirmation.

My workflow usually is that I first generate the password with PfP and then auto-fill the password into the form. However, with current PfP, you always need to use auto-fill twice, because it will only enter one password at a time.

Can you fix that or is that too much crazy heuristics?

If that helps, basic HTML code for such a form, copied from a site/abridged:

<form action="[somewhere]" method="post" enctype="application/x-www-form-urlencoded" autocomplete="off">
  <label for="password1">New Password</label>
  <input type="password" name="password1" id="password1" autofocus="autofocus" />
  <label for="password2">Confirm Password</label>
  <input type="password" name="password2" id="password2"/>

  <input type="hidden" name="processAction" value="change"/>
  <input type="hidden" name="pwmFormID" value="[TOKEN]"/>

  <button type="submit" name="change">Change Password</button>
  <button type="button" name="change" form="form-reset">Cancel</button>
</form>
palant commented 4 years ago

The heuristic is: if you don't have a particular password field focused, all password fields will be filled out. If you have one focused, only that field will be filled out. The reason is that most password change forms have three password fields: once the old password and twice the new one. I think that's the "better safe than sorry" situation.