You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2026/10/17 06:03:00 UTC

[jira] [Commented] (CAMEL-25715) camel-jbang - camel cmd eval breaks an expression with a double quote or a slash

    [ https://issues.apache.org/jira/browse/CAMEL-25715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18128076#comment-18128076 ] 

Claus Ibsen commented on CAMEL-25715:
-------------------------------------

Fixed on main in https://github.com/apache/camel/pull/27979 (merged as 26a31bf3939f, 4.24.0). Backport to camel-4.22.x: https://github.com/apache/camel/pull/27993 (only EvalExpressionCommand has the bug on that branch).

_Claude Code on behalf of davsclaus_

> camel-jbang - camel cmd eval breaks an expression with a double quote or a slash
> --------------------------------------------------------------------------------
>
>                 Key: CAMEL-25715
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25715
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jbang
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.22.2, 4.24.0
>
>
> camel cmd eval, and the tools that evaluate an expression in a running integration (the eval_expression tool of camel ask, camel_eval_expression of the MCP servers with an integration selected), JSON-escaped the expression and the body before putting them in the action, which is JSON already. The eval action of the CLI connector reads the values as they are, so an expression with a double quote failed, such as ${body} == "hello" (Binary operator == does not accept \"hello\" ...), and a slash, as in every XPath, or a quote in the body became part of the text.
> Fixed on main in https://github.com/apache/camel/pull/27979 (found while testing the CLI for CAMEL-23688). On camel-4.22.x only EvalExpressionCommand has the bug.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)