Claude Sonnet 5.5 · 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
2
Comments matching a bug
2
Comments not matching
0
Cost of this PR
$3.276

Published comments (2)

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

Overlapping common prefix and suffix cause StringIndexOutOfBoundsException — When the sanitizer changes markup next to identical characters, `start` and `end` overlap, so the `substring` calls throw `StringIndexOutOfBoundsException` and the verifier crashes instead of reporting the message. Cap the suffix loop at `Math.min(value.length(), sanitized.length()) - start`.

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

Multivalued size message uses MessageFormat syntax in an i18next bundle — i18next will show the `{0}` placeholders and the `choice` expression literally in the account console, because the bundle and `i18n.ts` use `{{n}}` interpolation. Restore `{{0}}`, `{{1}}` and `{{2}}` in `error-invalid-multivalued-size`, and replace `choice` with neutral wording or i18next plural keys. **Also found in:** - `js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties:3138-3138`

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.