Commit 0a74bd19 authored by Stan Hu's avatar Stan Hu

Disable password autocomplete in mirror form fill

Chrome and other browsers ignore `autocomplete=false` and
`autocomplete=off` now. We suspect that this caused 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.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/50812
parent 5d3eace2
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
.changing-auth-method= icon('spinner spin lg') .changing-auth-method= icon('spinner spin lg')
.well-password-auth.collapse.js-well-password-auth .well-password-auth.collapse.js-well-password-auth
= f.label :password, _("Password"), class: "label-bold" = f.label :password, _("Password"), class: "label-bold"
= f.password_field :password, value: import_data.password, class: 'form-control' = f.password_field :password, value: import_data.password, class: 'form-control', autocomplete: 'new-password'
.well-ssh-auth.collapse.js-well-ssh-auth .well-ssh-auth.collapse.js-well-ssh-auth
%p.js-ssh-public-key-present{ class: ('collapse' unless ssh_public_key_present) } %p.js-ssh-public-key-present{ class: ('collapse' unless ssh_public_key_present) }
= _('Here is the public SSH key that needs to be added to the remote server. For more information, please refer to the documentation.') = _('Here is the public SSH key that needs to be added to the remote server. For more information, please refer to the documentation.')
......
---
title: Disable password autocomplete in mirror form fill
merge_request:
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment