From 53d79203494ef49215c7065ac447e7723606e074 Mon Sep 17 00:00:00 2001 From: Liam Neville Date: Fri, 17 Jul 2026 09:37:41 +0300 Subject: [PATCH] fix(console): display minimum length in password complexity message (#12419) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Which Problems Are Solved During user registration and password changes, the console's password complexity hint displayed the raw `{{value}}` placeholder instead of the configured minimum length — e.g. `Must be at least {{value}} characters long (0/8)`. The bug is language-independent (confirmed in English and Dutch). # How the Problems Are Solved The `password-complexity-view` template passed `policy.minLength` — a proto `uint64` that deserializes to a JavaScript `bigint` — to the ngx-translate pipe. ngx-translate v17's `formatValue` returns `undefined` for a `bigint`, so the `{{value}}` token was never substituted. The template now passes the component's existing `minLength` getter (`Number(policy.minLength)`), so the value interpolates correctly. # Additional Changes None # Additional Context - Closes #12390 - Reported on ZITADEL Cloud v4.15.3 --------- Co-authored-by: Cursor Co-authored-by: Ramon Co-authored-by: Livio Spring <9405495+livio-a@users.noreply.github.com> --- .../password-complexity-view.component.html | 4 ++-- console/src/assets/i18n/it.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/console/src/app/modules/password-complexity-view/password-complexity-view.component.html b/console/src/app/modules/password-complexity-view/password-complexity-view.component.html index 62e225f1a..629cf388b 100644 --- a/console/src/app/modules/password-complexity-view/password-complexity-view.component.html +++ b/console/src/app/modules/password-complexity-view/password-complexity-view.component.html @@ -23,8 +23,8 @@ } } {{ 'USER.PASSWORD.MINLENGTHERROR' | translate: { value: policy.minLength } }} ({{ password?.value?.length }}/{{ - policy.minLength + >{{ 'USER.PASSWORD.MINLENGTHERROR' | translate: { value: minLength } }} ({{ password?.value?.length }}/{{ + minLength }}) diff --git a/console/src/assets/i18n/it.json b/console/src/assets/i18n/it.json index e26b69029..1fd91b7e7 100644 --- a/console/src/assets/i18n/it.json +++ b/console/src/assets/i18n/it.json @@ -1040,7 +1040,7 @@ "SET": "Imposta nuova password", "RESENDNOTIFICATION": "Invia email per la reimpostazione", "REQUIRED": "Mancano alcuni campi obbligatori.", - "MINLENGTHERROR": "Deve essere lunga almeno {{valore}} caratteri.", + "MINLENGTHERROR": "Deve essere lunga almeno {{value}} caratteri.", "MAXLENGTHERROR": "Deve contenere meno di {{value}} caratteri" }, "ID": "ID utente",