davsclaus opened a new pull request, #28310:
URL: https://github.com/apache/camel/pull/28310

   Fixes [CAMEL-26028](https://issues.apache.org/jira/browse/CAMEL-26028).
   
   When the method of an API component fails, `ApiMethodHelper.invokeMethod` 
threw "Error invoking <method> with <arguments>: <message>" with the map of all 
the arguments of the call. That map holds the options of the endpoint as well, 
so the message, and the log of the error handler, showed their values, such as 
a password or a token, and the message data. This applies to all API 
components: as2, box, braintree, dhis2, fhir, google-calendar, google-drive, 
google-mail, google-sheets, olingo2, olingo4, twilio and zendesk.
   
   **Changes**
   - The error message names the arguments only, sorted: `Error invoking sayHi 
with [name, password]: boom`.
   - The debug log of the call masks the values of the sensitive options 
(`SensitiveUtils`), and passwords in URI userinfo.
   - Upgrade guide entries for 4.24, and for 4.22.3 and 4.18.6, as the fix is 
to be backported (`port/camel-4.22.x`, `port/camel-4.18.x`; the same code is on 
both branches).
   
   **Tests**
   - `ApiMethodHelperTest.testInvokeMethodErrorShowsNoArgumentValues`: a method 
that throws, and an argument of the wrong type, give a message with the names 
of the arguments and without the value of a `password` argument. The other 
tests of `ApiMethodHelperTest` pass.
   - Checked before the fix with `camel run`: a fhir producer with the 
`username` and `password` options, calling a server that does not answer, 
failed with a message that held the password.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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