GPT-6.1 Sol · 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
- 5
- Comments matching a bug
- 2
- Comments not matching
- 3
- Cost of this PR
- $2.873
Published comments (5)
MessageFormat syntax breaks validation messages in both React UI bundles — Attribute names and bounds remain uninterpolated, and choice expressions appear literally because `ThemeResource.getLocalizationTexts` returns strings without MessageFormat processing. Keep i18next-compatible `{{0}}`, `{{1}}`, and `{{2}}` placeholders and avoid ChoiceFormat syntax in `error-invalid-multivalued-size` in both React UI bundles.
Choice-expression removal bypasses translation anchor validation — Translations can bypass anchor restrictions because `value.replaceAll` hides choice branches from validation, while `LinkExpirationFormatterMethod` renders them into emails and the runtime sanitizer allows off-site links. Validate every branch’s contents instead of discarding entire choice expressions.
Malformed HTML fixture masks regressions in forbidden-tag validation — `verifyIllegalHtmlTagDetected` can pass even if `POLICY_SOME_HTML` allows `div`, because repairing the malformed closing tag still triggers a validation error. Give `key` a well-formed forbidden element so the test isolates the tag restriction.
Lithuanian OTP setup instructions are in Italian in login and account bundles — Users selecting Lithuanian receive the first OTP setup step in Italian through `loginTotpStep1`. Replace it with a Lithuanian translation and correct `totpStep1` in the account `messages_lt.properties` bundle too. **Also found in:** - `themes/src/main/resources-community/theme/base/account/messages/messages_lt.properties:101-101`
Overlapping prefix and suffix scans crash malformed HTML verification — Overlapping scans make `sanitized.substring` throw `StringIndexOutOfBoundsException` for malformed HTML such as `<p>x</p></p>`, aborting verification instead of reporting it. Bound `end` by the unmatched lengths remaining after `start` in both `sanitized` and `value`.
Gold bugs found (2)
Gold bugs missed (0)
None.