GPT-6.1 Sol · Balanced
add-html-sanitizer-for-translated-message-resources-keycloak
Keycloak · Java · M · 100–299 lines · 6 files
The normal review, with one generalist agent. Judge: Claude Haiku 5.5.
- Gold bugs found
- 2 of 2
- Comments published
- 4
- Comments matching a bug
- 2
- Comments not matching
- 2
- Cost of this PR
- $1.327
Published comments (4)
Overlapping prefix and suffix matching crashes HTML validation — When the sanitizer appends a closing element, overlapping prefix and suffix matches make `substring` throw, preventing the Maven verifier from collecting remaining diagnostics. Bound `end` by each string’s remaining length after subtracting `start`.
Java-format placeholders break multivalued-size errors in both UIs — Users see literal placeholders and ChoiceFormat text because `ThemeResource` returns these strings unchanged and `setUserProfileServerError` uses i18next interpolation. Keep `error-invalid-multivalued-size` compatible with i18next placeholders and supported pluralization in both account and admin UI bundles.
ChoiceFormat normalization hides HTML in translation branches — Unchecked HTML can reach verification emails through `LinkExpirationFormatterMethod`, and the runtime sanitizer permits external HTTPS links. In `VerifyMessageProperties`, preserve and validate HTML inside ChoiceFormat branches, exempting only numeric choice operators instead of replacing entire expressions.
Lithuanian login and account OTP instructions are in Italian — Lithuanian users receive Italian OTP installation instructions from `loginTotpStep1` and the account bundle’s `totpStep1`. Replace both values with Lithuanian instructions while keeping embedded links removed.
Gold bugs found (2)
Gold bugs missed (0)
None.