jamesnetherton opened a new pull request, #560:
URL: https://github.com/apache/camel-quarkus-examples/pull/560

   `RestOrderRoute` assembled its JSON response with `String.format`, 
interpolating the message returned by the SOAP service directly into a JSON 
template. Any quote or backslash in that message yields malformed JSON. This 
replaces it with an `OrderResponse` POJO encoded by the route's existing 
`RestBindingMode.json` binding.
   
   The explicit `Content-Type` header is kept — after the CXF call the exchange 
carries `text/xml`, and the REST binding will not marshal to JSON without it.
   
   `KeycloakAdminRoute`'s error handler embedded `${exception.message}` inside 
a `constant()`, so the placeholder was emitted literally instead of being 
resolved. Rather than switch to `simple()` — which would turn a latent bug into 
a genuine information leak — the response is now a static message and the 
exception detail stays in the log, which has been raised to `ERROR`.
   
   The success-path test asserted only that the response string contained 
`success` and `true`, which passes on malformed JSON. It now asserts the parsed 
JSON fields, so the response has to be well-formed.
   
   Verified with `mvn clean verify -Dnative`.
   
   _Claude Code on behalf of James Netherton_
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to