Skip to content

Commit

Permalink
Add autocompletion for password reset
Browse files Browse the repository at this point in the history
Using autocomplete="current-password" and autocomplete="new-password"
will help browser with integrated password managers to generate safe
password for the users.

See https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_an_html_input_element
and https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/password#allowing_autocomplete.

Close #27885

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
  • Loading branch information
CarlSchwan committed Jul 13, 2021
1 parent a8aeaa6 commit 281a8fa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
<label for="pass1" class="hidden-visually"><?php p($l->t('Current password')); ?>: </label>
<input type="password" id="pass1" name="oldpassword"
placeholder="<?php p($l->t('Current password'));?>"
autocomplete="off" autocapitalize="none" autocorrect="off" />
autocomplete="current-password" autocapitalize="none" autocorrect="off" />

<div class="personal-show-container">
<label for="pass2" class="hidden-visually"><?php p($l->t('New password'));?>: </label>
<input type="password" id="pass2" name="newpassword"
placeholder="<?php p($l->t('New password')); ?>"
data-typetoggle="#personal-show"
autocomplete="off" autocapitalize="none" autocorrect="off" />
autocomplete="new-password" autocapitalize="none" autocorrect="off" />
<input type="checkbox" id="personal-show" class="hidden-visually" name="show" /><label for="personal-show" class="personal-show-label"></label>
</div>

Expand Down

0 comments on commit 281a8fa

Please sign in to comment.