Kimi K3.1 Pro · 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
- 7
- Comments matching a bug
- 2
- Comments not matching
- 5
- Cost of this PR
- $3.216
Published comments (7)
Arbitrary HTML inside a choice branch is never inspected because the whole expression becomes… — A translation such as `{0,choice,0#<a href="https://evil.example">minutes</a>|1#minute|1<minutes}` passes verification but `LinkExpirationFormatterMethod` emits the link into HTML emails; normalize only the choice comparison operators, not the branch text.
Unbalanced translation anchors pass verification after tag stripping — A translation with the same opening anchor as English but no closing `</a>` has its opening tag removed and then compares clean, because the loop has no remaining target match and never validates balance. This accepts malformed HTML and can leave the rendered link swallowing subsequent content; reject unbalanced target anchors before stripping matched tags.
Bundle read errors bypass verify()'s MojoExecutionException contract — Preserve the prior contract by allowing these `IOException`s to reach `verify()`'s existing catch (or explicitly wrapping them in `MojoExecutionException`); handle a missing English bundle as a validation message if that case is expected.
Overlapping affixes crash the illegal HTML diagnostic — Limit the suffix scan to the characters remaining after the prefix (`min(lengths) - start`) before taking either substring.
Server error placeholders use unsupported Java MessageFormat syntax — The account UI formats these server errors with default i18next, which does not interpolate single-brace `{0}`/`{1}`/`{2}` or Java `{2,choice,...}` syntax, so English users see the placeholders literally. Retain `{{0}}`-style parameters and use i18next-supported pluralization for this bundle. **Also found in:** - `js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties:3138-3138`
Lithuanian login and account TOTP instructions contain Italian text — The new instruction is Italian, so the Lithuanian login TOTP page displays the wrong language; the identical text was also added to `themes/src/main/resources-community/theme/base/account/messages/messages_lt.properties`. Replace both occurrences with Lithuanian text. **Also found in:** - `themes/src/main/resources-community/theme/base/account/messages/messages_lt.properties:101-101`
TOTP instruction uses Traditional Chinese in the Simplified Chinese bundle — The new value is written in Traditional Chinese (`在您的手機上安裝以下應用程式之一:`) even though this is the Simplified Chinese (`zh_CN`) bundle and adjacent messages use Simplified Chinese. Use Simplified Chinese wording, for example `在您的手机上安装以下应用程序之一:`, so the TOTP instruction matches the selected locale.
Gold bugs found (2)
Gold bugs missed (0)
None.