DeepSeek V4.1 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
- 1 of 2
- Comments published
- 5
- Comments matching a bug
- 1
- Comments not matching
- 4
- Cost of this PR
- $0.628
Published comments (5)
Choice-format blocks hide HTML from message sanitizer — Because `normalizeValue` strips the `{n,choice,...}` block before sanitizing, HTML hidden in `error-invalid-multivalued-size` on both sides is erased and passes, enabling XSS. Sanitize the block content before substituting the placeholder instead of discarding it.
Lithuanian TOTP setup message replaced with Italian text — Lithuanian users now see an Italian sentence on the TOTP setup page. Restore a Lithuanian translation of `loginTotpStep1` here and of `totpStep1` in `themes/src/main/resources-community/theme/base/account/messages/messages_lt.properties`.
Tests never exercise allowed HTML translation branch — Both `illegalHtmlTag_en.properties` and `noHtml_de.properties` bypass the permissive branch, so breaking `containsHtml(englishValue)` would leave all tests green while legal `<b>` translations fail. Add an English/German fixture pair with an allowed tag asserting `verify()` returns empty.
Multivalued size error message uses Java MessageFormat syntax i18next cannot render — The admin console renders this key with i18next (`user-profile/utils.ts:79`), which ignores `{0}` and the `MessageFormat` choice, so users see the literal placeholder text. Keep `error-invalid-multivalued-size` in `{{n}}` form. **Also found in:** - `js/apps/account-ui/maven-resources/theme/keycloak.v3/account/messages/messages_en.properties:188-188`
Missing English bundle aborts verification with raw RuntimeException — A translation file without a matching `messages_en.properties` makes `verifySafeHtml` throw a raw `RuntimeException` that escapes the `IOException` catch and aborts the build. Check `Files.exists` and report the file through `messages` instead.