Gemini 3.8 Flash · 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
3
Comments matching a bug
2
Comments not matching
1
Cost of this PR
$1.561

Published comments (3)

mediumbugmisc/theme-verifier/src/main/java/org/keycloak/themeverifier/VerifyMessageProperties.java:74-75

Unescaped hyphen in `[a-zA-Z-_]` creates unexpected character range — The regex treats `Z-_` as an ASCII range instead of a literal hyphen, preventing hyphenated locale codes from matching. Move the hyphen to the end of the character class as `[a-zA-Z_-]` or escape it.

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

Unsupported MessageFormat syntax used in i18next message property — Using Java `MessageFormat` syntax in `error-invalid-multivalued-size` breaks i18next localization, displaying raw placeholders and choice expressions directly to users. Switch back to `{{0}}` interpolation placeholders and replace the choice format with static wording. **Also found in:** - `js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties:3138-3138`

mediumbugmisc/theme-verifier/src/main/java/org/keycloak/themeverifier/VerifyMessageProperties.java:106-112

Unconstrained end index calculation causes StringIndexOutOfBoundsException — Overlapping prefix and suffix matches can cause `length - end` to fall below `start`, throwing a `StringIndexOutOfBoundsException` in `substring()`. Constrain `end` in the loop condition using `sanitized.length() - start` and `value.length() - start`.

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.