mirror of
https://github.com/zitadel/zitadel.git
synced 2026-11-03 20:56:50 -06:00
fix(console): display minimum length in password complexity message (#12419)
# 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 <cursoragent@cursor.com>
Co-authored-by: Ramon <mail@conblem.me>
Co-authored-by: Livio Spring <9405495+livio-a@users.noreply.github.com>
(cherry picked from commit 53d7920349)
This commit is contained in:
1 parent
6cb62d6829
commit
acf55ebff7
2 files changed
+3
-3
No files matched your search
+2
-2
@@ -23,8 +23,8 @@
|
||||
}
|
||||
}
|
||||
<span class="cnsl-secondary-text"
|
||||
>{{ 'USER.PASSWORD.MINLENGTHERROR' | translate: { value: policy.minLength } }} ({{ password?.value?.length }}/{{
|
||||
policy.minLength
|
||||
>{{ 'USER.PASSWORD.MINLENGTHERROR' | translate: { value: minLength } }} ({{ password?.value?.length }}/{{
|
||||
minLength
|
||||
}})
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user