From 7c6fdcb12e74e6cc49b1c68a32b004b54768ff61 Mon Sep 17 00:00:00 2001 From: Pravesh Sharma Date: Mon, 29 Apr 2024 11:44:17 +0530 Subject: [PATCH] Disabled auto-fill on password fields. #2410 --- .../databases/subscriptions/static/js/subscription.ui.js | 2 +- .../browser/server_groups/servers/roles/static/js/role.ui.js | 1 + web/pgadmin/misc/cloud/static/js/aws_schema.ui.js | 4 ++-- web/pgadmin/misc/cloud/static/js/azure_schema.ui.js | 2 +- web/pgadmin/misc/cloud/static/js/biganimal_schema.ui.js | 2 +- web/pgadmin/misc/cloud/static/js/google_schema.ui.js | 2 +- web/pgadmin/static/js/Dialogs/ConnectServerContent.jsx | 4 ++-- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/static/js/subscription.ui.js b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/static/js/subscription.ui.js index ef6181e17..f6775c187 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/static/js/subscription.ui.js +++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/static/js/subscription.ui.js @@ -156,7 +156,7 @@ export default class SubscriptionSchema extends BaseUISchema{ }, { id: 'password', label: gettext('Password'), type: 'password', - controlProps: { maxLength: null}, + controlProps: { maxLength: null, autoComplete: 'new-password' }, group: gettext('Connection'), mode: ['create', 'edit'], skipChange: true, deps: ['connect_now'], diff --git a/web/pgadmin/browser/server_groups/servers/roles/static/js/role.ui.js b/web/pgadmin/browser/server_groups/servers/roles/static/js/role.ui.js index 23fe95f80..9ba7c6e6b 100644 --- a/web/pgadmin/browser/server_groups/servers/roles/static/js/role.ui.js +++ b/web/pgadmin/browser/server_groups/servers/roles/static/js/role.ui.js @@ -93,6 +93,7 @@ export default class RoleSchema extends BaseUISchema { group: gettext('Definition'), mode: ['edit', 'create'], control: 'input', deps: ['rolcanlogin'], retype: true, cell: 'text', disabled: obj.readOnly, + controlProps: { autoComplete: 'new-password' }, }, { id: 'rolvaliduntil', type: 'datetimepicker', diff --git a/web/pgadmin/misc/cloud/static/js/aws_schema.ui.js b/web/pgadmin/misc/cloud/static/js/aws_schema.ui.js index d66f3049f..3a5963062 100644 --- a/web/pgadmin/misc/cloud/static/js/aws_schema.ui.js +++ b/web/pgadmin/misc/cloud/static/js/aws_schema.ui.js @@ -97,7 +97,7 @@ class CloudDBCredSchema extends BaseUISchema { mode: ['create'], noEmpty: true, }, { id: 'secret_access_key', label: gettext('AWS secret access key'), type: 'password', - mode: ['create'], noEmpty: true, + mode: ['create'], noEmpty: true, controlProps: { autoComplete: 'new-password' }, }, { id: 'session_token', label: gettext('AWS session token'), type: 'multiline', mode: ['create'], noEmpty: false, @@ -165,7 +165,7 @@ class DatabaseSchema extends BaseUISchema { mode: ['create'], noEmpty: true, }, { id: 'db_password', label: gettext('Password'), type: 'password', - mode: ['create'], noEmpty: true, + mode: ['create'], noEmpty: true, controlProps: { autoComplete: 'new-password' }, helpMessage: gettext('At least 8 printable ASCII characters. Cannot contain any of the following: / (slash), \'(single quote), "(double quote) and @ (at sign).') }, { id: 'db_confirm_password', label: gettext('Confirm password'), diff --git a/web/pgadmin/misc/cloud/static/js/azure_schema.ui.js b/web/pgadmin/misc/cloud/static/js/azure_schema.ui.js index 64d068c6d..a009ae8dc 100644 --- a/web/pgadmin/misc/cloud/static/js/azure_schema.ui.js +++ b/web/pgadmin/misc/cloud/static/js/azure_schema.ui.js @@ -491,7 +491,7 @@ class AzureDatabaseSchema extends BaseUISchema { noEmpty: true, helpMessage: gettext( 'The password must be 8-128 characters long and must contain characters from three of the following categories - English uppercase letters, English lowercase letters, numbers (0-9), and non-alphanumeric characters (!, $, #, %, etc.), and cannot contain all or part of the login name' - ), + ), controlProps: { autoComplete: 'new-password' } }, { id: 'db_confirm_password', diff --git a/web/pgadmin/misc/cloud/static/js/biganimal_schema.ui.js b/web/pgadmin/misc/cloud/static/js/biganimal_schema.ui.js index f376de9c0..4853e4b77 100644 --- a/web/pgadmin/misc/cloud/static/js/biganimal_schema.ui.js +++ b/web/pgadmin/misc/cloud/static/js/biganimal_schema.ui.js @@ -421,7 +421,7 @@ class BigAnimalDatabaseSchema extends BaseUISchema { }, },{ id: 'password', label: gettext('Database password'), type: 'password', - mode: ['create'], noEmpty: true, + mode: ['create'], noEmpty: true, controlProps: { autoComplete: 'new-password' } },{ id: 'confirm_password', label: gettext('Confirm password'), type: 'password', mode: ['create'], noEmpty: true, diff --git a/web/pgadmin/misc/cloud/static/js/google_schema.ui.js b/web/pgadmin/misc/cloud/static/js/google_schema.ui.js index db5eaadff..2f181202e 100644 --- a/web/pgadmin/misc/cloud/static/js/google_schema.ui.js +++ b/web/pgadmin/misc/cloud/static/js/google_schema.ui.js @@ -391,7 +391,7 @@ class GoogleDatabaseSchema extends BaseUISchema { noEmpty: true, helpMessage: gettext( 'Set a password for the default admin user "postgres".' - ), + ), controlProps: { autoComplete: 'new-password' } }, { id: 'db_confirm_password', diff --git a/web/pgadmin/static/js/Dialogs/ConnectServerContent.jsx b/web/pgadmin/static/js/Dialogs/ConnectServerContent.jsx index c22543c1c..18439c1e4 100644 --- a/web/pgadmin/static/js/Dialogs/ConnectServerContent.jsx +++ b/web/pgadmin/static/js/Dialogs/ConnectServerContent.jsx @@ -70,7 +70,7 @@ export default function ConnectServerContent({closeModal, data, onOK, setHeight} - onTextChange(e, 'tunnel_password')} onKeyDown={(e)=>onKeyDown(e)} /> @@ -93,7 +93,7 @@ export default function ConnectServerContent({closeModal, data, onOK, setHeight} /* Set only if no tunnel password asked */ firstEleRef.current = ele; } - }} type="password" value={formData['password']} controlProps={{maxLength:null}} + }} type="password" value={formData['password']} controlProps={{maxLength:null, autoComplete:'new-password'}} onChange={(e)=>onTextChange(e, 'password')} onKeyDown={(e)=>onKeyDown(e)}/>