GLM-5.3 · 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 Haiku 5.5.

Gold bugs found
2 of 2
Comments published
5
Comments matching a bug
2
Comments not matching
3
Cost of this PR
$4.577

Published comments (5)

mediumbugmisc/theme-verifier/src/main/java/org/keycloak/themeverifier/VerifyMessageProperties.java:73-80

Missing English reference file crashes build with unchecked RuntimeException — Report it as a `messages` entry instead.

mediumbugmisc/theme-verifier/src/main/java/org/keycloak/themeverifier/VerifyMessageProperties.java:101-111

Overlapping prefix/suffix stripping can throw StringIndexOutOfBoundsException — If `sanitized` is a prefix of `value`, `start` and `end` can overlap so `start + end` exceeds `sanitized.length()`, and `sanitized.substring()` throws a `StringIndexOutOfBoundsException` that escapes `verify()` and fails the build. Stop the `end` loop once `start + end` reaches the length bound.

mediumbugjs/apps/account-ui/maven-resources/theme/keycloak.v3/account/messages/messages_en.properties:188

error-invalid-multivalued-size uses MessageFormat placeholders the JS i18n bundle cannot render — i18next cannot evaluate `{2,choice,...}`, so users see literal braces and translators get a convention unlike every other locale. Restore `{{0}}` here and in the matching admin-ui `messages_en.properties`, leaving choice plurals to the base themes. **Also found in:** - `js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties:3138-3138`

mediumbugthemes/src/main/resources-community/theme/base/account/messages/messages_lt.properties:101

Italian text pasted into Lithuanian totpStep1 message — Lithuanian users see Italian on the account and login TOTP setup pages — the same string was pasted into `loginTotpStep1` in the login `messages_lt.properties`. Replace both with the Lithuanian translation. **Also found in:** - `themes/src/main/resources-community/theme/base/login/messages/messages_lt.properties:71-71`

mediumbugthemes/src/main/resources-community/theme/base/account/messages/messages_zh_CN.properties:112

totpStep1 in zh_CN bundle uses Traditional Chinese instead of Simplified — Simplified-Chinese users get Traditional script (`手機`, `應用程式`) on the TOTP page, clashing with every other key in this bundle. Rewrite `totpStep1` in Simplified forms, matching adjacent keys like `totpStep2`.

Gold bugs found (2)

mediumThe diff-trimming code computes common prefix and suffix independently, so they can overlap and substring throws StringIndexOutOfBoundsException, crashing the verifier instead of reporting the illegal HTML.
mediumThe account and admin UI bundles now use Java MessageFormat placeholders and choice syntax for error-invalid-multivalued-size, but i18next expects {{n}}, so the UI shows literal {0}/{1}/{2} and the raw choice text.

Gold bugs missed (0)

None.