diff options
author | Stan Hu <stanhu@gmail.com> | 2018-11-28 12:18:56 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-11-28 12:20:56 +0300 |
commit | e76a676599bf5fd693d99284c8708448fea4e296 (patch) | |
tree | 4bd62c741f9208593d4ce01feb5e59ee1bb49389 /app/views/projects/mirrors/_authentication_method.html.haml | |
parent | e0e813bd03e3f4d8b025093b7aae59dd692b1fdd (diff) |
Disable password autocomplete in mirror form fill
Chrome and other browsers ignore autocomplete=false and autocomplete=off
now. This causes the mirroring section to expand whenever a user clicked
"Expand" in the Repository settings.
https://developers.google.com/web/fundamentals/design-and-ux/input/forms/?hl=en
recommends using new-password as the new field to prevent automatic
filling.
It looks like we already do this in app/views/shared/_field.html.haml.
This is a CE backport of
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8477.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/50812
Diffstat (limited to 'app/views/projects/mirrors/_authentication_method.html.haml')
-rw-r--r-- | app/views/projects/mirrors/_authentication_method.html.haml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/projects/mirrors/_authentication_method.html.haml b/app/views/projects/mirrors/_authentication_method.html.haml index 8dc042d87d1..3effdf934fb 100644 --- a/app/views/projects/mirrors/_authentication_method.html.haml +++ b/app/views/projects/mirrors/_authentication_method.html.haml @@ -15,7 +15,7 @@ .changing-auth-method= icon('spinner spin lg') .well-password-auth.collapse.js-well-password-auth = f.label :password, _("Password"), class: "label-bold" - = f.password_field :password, value: mirror.password, class: 'form-control' + = f.password_field :password, value: mirror.password, class: 'form-control', autocomplete: 'new-password' - unless is_push .well-ssh-auth.collapse.js-well-ssh-auth %p.js-ssh-public-key-present{ class: ('collapse' unless ssh_public_key_present) } |