Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2021-07-13 18:11:48 +0300
committerCarl Schwan <carl@carlschwan.eu>2021-10-22 13:18:26 +0300
commitb7a35afcf140c4ee442acd2ff4f9f6afa0533706 (patch)
treea5d9e8da09ad6b11954eb9039a106984545cdc60 /core/src
parenta9fe0fc5274fe6190c394fdb201cbb0c9f5c5976 (diff)
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>
Diffstat (limited to 'core/src')
-rw-r--r--core/src/components/login/LoginForm.vue7
-rw-r--r--core/src/components/login/UpdatePassword.vue3
2 files changed, 8 insertions, 2 deletions
diff --git a/core/src/components/login/LoginForm.vue b/core/src/components/login/LoginForm.vue
index 54e77b2c5f9..e702961d50e 100644
--- a/core/src/components/login/LoginForm.vue
+++ b/core/src/components/login/LoginForm.vue
@@ -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>
diff --git a/core/src/components/login/UpdatePassword.vue b/core/src/components/login/UpdatePassword.vue
index cb615a846d2..95778b993c8 100644
--- a/core/src/components/login/UpdatePassword.vue
+++ b/core/src/components/login/UpdatePassword.vue
@@ -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>