mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
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> Co-Authored-By: Julien Veyssier <eneiluj@posteo.net> Co-Authored-By: Pytal <24800714+Pytal@users.noreply.github.com>
This commit is contained in:
parent
a9fe0fc527
commit
b7a35afcf1
5 changed files with 12 additions and 6 deletions
|
|
@ -41,14 +41,14 @@ if ($_['passwordChangeSupported']) {
|
|||
<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>
|
||||
|
||||
|
|
|
|||
2
core/js/dist/login.js
vendored
2
core/js/dist/login.js
vendored
File diff suppressed because one or more lines are too long
2
core/js/dist/login.js.map
vendored
2
core/js/dist/login.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -59,7 +59,8 @@
|
|||
v-model="user"
|
||||
type="text"
|
||||
name="user"
|
||||
autocapitalize="off"
|
||||
autocapitalize="none"
|
||||
autocorrect="off"
|
||||
:autocomplete="autoCompleteAllowed ? 'on' : 'off'"
|
||||
:placeholder="t('core', 'Username or email')"
|
||||
:aria-label="t('core', 'Username or email')"
|
||||
|
|
@ -75,7 +76,9 @@
|
|||
:type="passwordInputType"
|
||||
class="password-with-toggle"
|
||||
name="password"
|
||||
:autocomplete="autoCompleteAllowed ? 'on' : 'off'"
|
||||
autocorrect="off"
|
||||
autocapitalize="none"
|
||||
:autocomplete="autoCompleteAllowed ? 'current-password' : 'off'"
|
||||
:placeholder="t('core', 'Password')"
|
||||
:aria-label="t('core', 'Password')"
|
||||
required>
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@
|
|||
v-model="password"
|
||||
type="password"
|
||||
name="password"
|
||||
autocomplete="new-password"
|
||||
autocapitalize="none"
|
||||
autocorrect="off"
|
||||
required
|
||||
:placeholder="t('core', 'New password')">
|
||||
</p>
|
||||
|
|
|
|||
Loading…
Reference in a new issue