From dcd2b608ea2293ac1242f7321fb3c72b3c00ae6d Mon Sep 17 00:00:00 2001 From: alex <48489896+devnaumov@users.noreply.github.com> Date: Thu, 21 May 2026 18:20:29 +0200 Subject: [PATCH] dbeaver/pro#9370 check all passwords, not only the first one (#4357) Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com> --- .../Options/ConnectionFormOptionsPart.ts | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/Options/ConnectionFormOptionsPart.ts b/webapp/packages/plugin-connections/src/ConnectionForm/Options/ConnectionFormOptionsPart.ts index 91fed24f80..beccfafaa4 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/Options/ConnectionFormOptionsPart.ts +++ b/webapp/packages/plugin-connections/src/ConnectionForm/Options/ConnectionFormOptionsPart.ts @@ -386,18 +386,25 @@ export class ConnectionFormOptionsPart extends FormPart property.features.includes('password')); - const isPasswordEmpty = - passwordProperty && - (this.state.credentials?.[passwordProperty.id!] === getObjectPropertyDefaultValue(passwordProperty) || - !this.state.credentials?.[passwordProperty.id!]); + const passwordProperties = properties.filter(property => property.features.includes('password')); if (isCredentialsChanged(properties, this.state.credentials!)) { this.state.credentials = prepareDynamicProperties(properties, toJS(this.state.credentials!)); } - if (isPasswordEmpty) { - delete this.state.credentials?.[passwordProperty.id!]; + if (passwordProperties.length > 0) { + for (const passwordProperty of passwordProperties) { + if (!passwordProperty.id) { + continue; + } + + if ( + this.state.credentials?.[passwordProperty.id] === getObjectPropertyDefaultValue(passwordProperty) || + (!passwordProperty.features.includes('file') && !this.state.credentials?.[passwordProperty.id]) + ) { + delete this.state.credentials?.[passwordProperty.id]; + } + } } }