Skip to content

Commit 1dd402b

Browse files
Add autocompletion for password reset
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. Also unify autocapitalize="none" autocorrect="off" behavior in a few other places for password input fields. Close #27885 Signed-off-by: Carl Schwan <carl@carlschwan.eu> Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
1 parent a8aeaa6 commit 1dd402b

5 files changed

Lines changed: 12 additions & 6 deletions

File tree

apps/settings/templates/settings/personal/security/password.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@
4141
<label for="pass1" class="hidden-visually"><?php p($l->t('Current password')); ?>: </label>
4242
<input type="password" id="pass1" name="oldpassword"
4343
placeholder="<?php p($l->t('Current password'));?>"
44-
autocomplete="off" autocapitalize="none" autocorrect="off" />
44+
autocomplete="current-password" autocapitalize="none" autocorrect="off" />
4545

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

0 commit comments

Comments
 (0)