From 8e34434138f9775710ed877daf770f8baffe6525 Mon Sep 17 00:00:00 2001 From: Kristen Tian Date: Mon, 7 Nov 2022 10:46:26 -0800 Subject: [PATCH] [MD] Add explicit no spellcheck on password fields Signed-off-by: Kristen Tian --- CHANGELOG.md | 1 + .../__snapshots__/create_data_source_form.test.tsx.snap | 6 ++++++ .../components/create_form/create_data_source_form.tsx | 1 + .../__snapshots__/update_password_modal.test.tsx.snap | 6 ++++++ .../update_password_modal/update_password_modal.tsx | 2 ++ 5 files changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 753971bd5823..76c9e27d1f8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [Legacy Maps Plugin] Prevent reverse-tabnabbing ([#2540](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2540)) - Eliminate dependency on `got` versions older than 11.8.5 ([#2801](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2801)) +- [MD] Add explicit no spellcheck on password fields ([#2818](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2818)) ### 📈 Features/Enhancements diff --git a/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/__snapshots__/create_data_source_form.test.tsx.snap b/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/__snapshots__/create_data_source_form.test.tsx.snap index fcd197cc0827..0e8dc0a57a62 100644 --- a/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/__snapshots__/create_data_source_form.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/__snapshots__/create_data_source_form.test.tsx.snap @@ -1537,6 +1537,7 @@ exports[`Datasource Management: Create Datasource form should create data source onChange={[Function]} onFocus={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="dual" value="test123" > @@ -1573,6 +1574,7 @@ exports[`Datasource Management: Create Datasource form should create data source onChange={[Function]} onFocus={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="password" value="test123" /> @@ -2469,6 +2471,7 @@ exports[`Datasource Management: Create Datasource form should render normally 1` onChange={[Function]} onFocus={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="dual" value="" > @@ -2505,6 +2508,7 @@ exports[`Datasource Management: Create Datasource form should render normally 1` onChange={[Function]} onFocus={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="password" value="" /> @@ -3418,6 +3422,7 @@ exports[`Datasource Management: Create Datasource form should throw validation e onChange={[Function]} onFocus={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="dual" value="test123" > @@ -3454,6 +3459,7 @@ exports[`Datasource Management: Create Datasource form should throw validation e onChange={[Function]} onFocus={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="password" value="test123" /> diff --git a/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/create_data_source_form.tsx b/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/create_data_source_form.tsx index 429790231a5c..b159065822df 100644 --- a/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/create_data_source_form.tsx +++ b/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/create_data_source_form.tsx @@ -276,6 +276,7 @@ export class CreateDataSourceForm extends React.Component< value={this.state.auth.credentials.password || ''} onChange={this.onChangePassword} onBlur={this.validatePassword} + spellCheck={false} data-test-subj="createDataSourceFormPasswordField" /> diff --git a/src/plugins/data_source_management/public/components/edit_data_source/components/update_password_modal/__snapshots__/update_password_modal.test.tsx.snap b/src/plugins/data_source_management/public/components/edit_data_source/components/update_password_modal/__snapshots__/update_password_modal.test.tsx.snap index ef19172398e1..7c5de9b6ba27 100644 --- a/src/plugins/data_source_management/public/components/edit_data_source/components/update_password_modal/__snapshots__/update_password_modal.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/edit_data_source/components/update_password_modal/__snapshots__/update_password_modal.test.tsx.snap @@ -142,6 +142,7 @@ exports[`Datasource Management: Update Stored Password Modal should render norma id="generated-id" name="updatedPassword" placeholder="Updated password" + spellcheck="false" type="password" value="" /> @@ -205,6 +206,7 @@ exports[`Datasource Management: Update Stored Password Modal should render norma id="generated-id" name="confirmUpdatedPassword" placeholder="Confirm Updated password" + spellcheck="false" type="password" value="" /> @@ -529,6 +531,7 @@ exports[`Datasource Management: Update Stored Password Modal should render norma onChange={[Function]} onFocus={[Function]} placeholder="Updated password" + spellCheck={false} type="dual" value="" > @@ -566,6 +569,7 @@ exports[`Datasource Management: Update Stored Password Modal should render norma onChange={[Function]} onFocus={[Function]} placeholder="Updated password" + spellCheck={false} type="password" value="" /> @@ -691,6 +695,7 @@ exports[`Datasource Management: Update Stored Password Modal should render norma onChange={[Function]} onFocus={[Function]} placeholder="Confirm Updated password" + spellCheck={false} type="dual" value="" > @@ -728,6 +733,7 @@ exports[`Datasource Management: Update Stored Password Modal should render norma onChange={[Function]} onFocus={[Function]} placeholder="Confirm Updated password" + spellCheck={false} type="password" value="" /> diff --git a/src/plugins/data_source_management/public/components/edit_data_source/components/update_password_modal/update_password_modal.tsx b/src/plugins/data_source_management/public/components/edit_data_source/components/update_password_modal/update_password_modal.tsx index 95ca0abe6e90..693a8a84234e 100644 --- a/src/plugins/data_source_management/public/components/edit_data_source/components/update_password_modal/update_password_modal.tsx +++ b/src/plugins/data_source_management/public/components/edit_data_source/components/update_password_modal/update_password_modal.tsx @@ -125,6 +125,7 @@ export const UpdatePasswordModal = ({ type={'dual'} value={newPassword} isInvalid={!isNewPasswordValid} + spellCheck={false} onChange={(e) => setNewPassword(e.target.value)} onBlur={validateNewPassword} /> @@ -149,6 +150,7 @@ export const UpdatePasswordModal = ({ type={'dual'} value={confirmNewPassword} isInvalid={!!isConfirmNewPasswordValid.length} + spellCheck={false} onChange={(e) => setConfirmNewPassword(e.target.value)} onBlur={validateConfirmNewPassword} />