GLM-5.3 · Balanced
add-html-sanitizer-for-translated-message-resources-keycloak
Keycloak · Java · M · 100–299 lines · 6 files
The normal review, with one generalist agent. Judge: Claude Haiku 5.5.
- Gold bugs found
- 1 of 2
- Comments published
- 3
- Comments matching a bug
- 1
- Comments not matching
- 2
- Cost of this PR
- $2.065
Published comments (3)
Choice block stripping hides injected HTML from the sanitizer — Because `[^}]*` deletes the whole choice block before `santizeAnchors` and `policy.sanitize` run, hidden anchor markup passes verification yet `MessageFormat` re-emits it at runtime where `kcSanitize` still permits `a[href]`. Strip only the numeric `N<` separators so any other `<` is flagged.
MessageFormat placeholders in client-side bundle are never substituted by i18next — `error-invalid-multivalued-size` is rendered client-side by `setUserProfileServerError` in `js/libs/ui-shared/src/user-profile/utils.ts` using stock i18next, which only substitutes `{{n}}`, so English users see literal `{0}` and `{2,choice,…}`. Restore `{{n}}` placeholders in both UI bundles — this file and `js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties` — keeping choice syntax only in the server-side base properties. **Also found in:** - `js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties:3138-3138`
Lithuanian loginTotpStep1 replaced with Italian text in TOTP setup — Lithuanian users see Italian text on the TOTP setup page, and the same Italian string was pasted into `totpStep1` in `themes/src/main/resources-community/theme/base/account/messages/messages_lt.properties`. Replace both with a Lithuanian translation, e.g. "Įdiekite vieną iš šių programėlių į savo mobilųjį telefoną:", as done for the sibling locales. **Also found in:** - `themes/src/main/resources-community/theme/base/account/messages/messages_lt.properties:101-101`