Amazon Ergo 1.0 · Heavy
add-html-sanitizer-for-translated-message-resources-keycloak
Keycloak · Java · M · 100–299 lines · 6 files
The generalist plus 9 specialist lens agents in parallel, then the same verify and dedup steps. Judge: Claude Opus 5.5.
- Gold bugs found
- 3 of 7
- Comments published
- 4
- Comments matching a bug
- 3
- Comments not matching
- 1
- Cost of this PR
- $6.482
Published comments (4)
Missing positive test for allowed HTML in translations — A regression that rejects all HTML in translations would leave this suite green while breaking CI for legitimate translations. Add a test and fixture with allowed HTML such as `<b>bold</b>` mirroring the English source, and assert that `verify()` returns an empty list.
loginTotpStep1 is Italian instead of Lithuanian — Users of the `lt` locale will see Italian on the OTP setup page. Replace `loginTotpStep1` with a Lithuanian translation, such as `Įdiekite vieną iš šių programėlių į savo mobilųjį telefoną:`. **Also found in:** - `themes/src/main/resources-community/theme/base/account/messages/messages_lt.properties:101-101`
Java MessageFormat placeholders break i18next interpolation — The account UI will show the raw pattern instead of the attribute name and min/max values because i18next does not interpolate `{0}` or `{2,choice,...}` by default. Keep `{{0}}`, `{{1}}`, and `{{2}}` in this bundle, or configure a separate interpolation/formatting path; check `t(unWrap(e.errorMessage), params)` in `js/libs/ui-shared/src/user-profile/utils.ts`. **Also found in:** - `js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties:3138-3138`
Illegal HTML diagnostic can throw StringIndexOutOfBoundsException — A translation ending in an unclosed `<b>`, `<p>`, or `<strong>` can crash the verifier instead of reporting illegal HTML. Clamp `end` to the smaller of `value.length() - start` and `sanitized.length() - start` before either `substring` call. **Also found in:** - `misc/theme-verifier/src/main/java/org/keycloak/themeverifier/VerifyMessageProperties.java:119-128`