davsclaus opened a new pull request, #29750: URL: https://github.com/apache/camel/pull/29750
Fixes https://issues.apache.org/jira/browse/CAMEL-25978 The language command of the control bus (`controlbus:language:<name>`) evaluates the message body as an expression of the named language, such as `simple` or `groovy`. Until now it worked for every language on the classpath, and nothing had to turn it on. ## Change - New option `allowedLanguages` on the component and on the endpoint (label `security`): the names of the languages the language command may use, separated by comma, such as `simple`. - **Changed default:** the option is empty, so the language command is off. A `controlbus:language:<name>` endpoint whose language is not listed fails when it is created (`ResolveEndpointFailedException` caused by an `IllegalArgumentException` that names the `allowedLanguages` option). - The endpoint list takes precedence over the component list (`camel.component.controlbus.allowed-languages = simple`). - The route command (`controlbus:route?action=...`) is unchanged. ## Docs - Component page: the "Using Simple language" section explains the option, shows it for the component and the endpoint, and says the body must come from the route, not from an untrusted sender. - Upgrade guide 4.24: new entry for the changed default. ## Tests - New `ControlBusLanguageAllowedTest` (camel-core): off by default, language not in the list, list on the endpoint (with spaces), list on the component, endpoint list overriding the component list. - `ControlBusLanguageSimpleStartRouteTest` now turns `simple` on through the component option. - `ControlBus*Test` in camel-core: 15 tests, all pass. Generated files regenerated: component JSON, configurers, URI factory, catalog JSON and doc, endpoint DSL and component DSL. _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]
