From 75f7d0da2c6fda3fdbfcad59ff437733904bd840 Mon Sep 17 00:00:00 2001 From: yzamir Date: Tue, 2 Apr 2024 12:30:33 +0300 Subject: [PATCH] Validate secret text instead of base64 text Signed-off-by: yzamir --- .../components/edit/EsxiCredentialsEdit.tsx | 4 ++-- .../components/edit/VCenterCredentialsEdit.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/forklift-console-plugin/src/modules/Providers/views/details/components/CredentialsSection/components/edit/EsxiCredentialsEdit.tsx b/packages/forklift-console-plugin/src/modules/Providers/views/details/components/CredentialsSection/components/edit/EsxiCredentialsEdit.tsx index 8c31703d1..a7ee375cd 100644 --- a/packages/forklift-console-plugin/src/modules/Providers/views/details/components/CredentialsSection/components/edit/EsxiCredentialsEdit.tsx +++ b/packages/forklift-console-plugin/src/modules/Providers/views/details/components/CredentialsSection/components/edit/EsxiCredentialsEdit.tsx @@ -55,8 +55,8 @@ export const EsxiCredentialsEdit: React.FC = ({ secret, onCh const initialState = { passwordHidden: true, validation: { - user: esxiSecretFieldValidator('user', secret?.data?.user), - password: esxiSecretFieldValidator('password', secret?.data?.password), + user: esxiSecretFieldValidator('user', user), + password: esxiSecretFieldValidator('password', password), insecureSkipVerify: { type: 'default', msg: 'Skip certificate validation' }, cacert: { type: 'default', diff --git a/packages/forklift-console-plugin/src/modules/Providers/views/details/components/CredentialsSection/components/edit/VCenterCredentialsEdit.tsx b/packages/forklift-console-plugin/src/modules/Providers/views/details/components/CredentialsSection/components/edit/VCenterCredentialsEdit.tsx index 9206d70bc..bc0139988 100644 --- a/packages/forklift-console-plugin/src/modules/Providers/views/details/components/CredentialsSection/components/edit/VCenterCredentialsEdit.tsx +++ b/packages/forklift-console-plugin/src/modules/Providers/views/details/components/CredentialsSection/components/edit/VCenterCredentialsEdit.tsx @@ -55,8 +55,8 @@ export const VCenterCredentialsEdit: React.FC = ({ secret, o const initialState = { passwordHidden: true, validation: { - user: vcenterSecretFieldValidator('user', secret?.data?.user), - password: vcenterSecretFieldValidator('password', secret?.data?.password), + user: vcenterSecretFieldValidator('user', user), + password: vcenterSecretFieldValidator('password', password), insecureSkipVerify: { type: 'default', msg: 'Skip certificate validation' }, cacert: { type: 'default',