From 384d4be8649099c0ed3355a7b29acc0cdeeacd91 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 11 Aug 2021 19:21:19 +0530 Subject: [PATCH] suppress browsers' password autocomplete for document passwords --- www/common/common-interface.js | 3 ++- www/settings/inner.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/www/common/common-interface.js b/www/common/common-interface.js index 588fdf5fa..71a1ed8af 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -867,7 +867,8 @@ define([ UI.passwordInput = function (opts, displayEye) { opts = opts || {}; var attributes = merge({ - type: 'password' + type: 'password', + autocomplete: 'new-password', // https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values }, opts); var input = h('input.cp-password-input', attributes); diff --git a/www/settings/inner.js b/www/settings/inner.js index 798af282b..4dae9add6 100644 --- a/www/settings/inner.js +++ b/www/settings/inner.js @@ -579,7 +579,8 @@ define([ var form = h('div', [ UI.passwordInput({ id: 'cp-settings-change-password-current', - placeholder: Messages.settings_changePasswordCurrent + placeholder: Messages.settings_changePasswordCurrent, + autocomplete: 'current-password', }, true), h('br'), UI.passwordInput({