[
https://issues.apache.org/jira/browse/CAMEL-23799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-23799.
---------------------------------
Resolution: Fixed
> Simple language: sort init-block substitution keys by length to prevent
> prefix collision
> ----------------------------------------------------------------------------------------
>
> Key: CAMEL-23799
> URL: https://issues.apache.org/jira/browse/CAMEL-23799
> Project: Camel
> Issue Type: Bug
> Reporter: Adriano Machado
> Assignee: Adriano Machado
> Priority: Minor
> Fix For: 4.21.0
>
>
> When SimpleExpressionParser and SimplePredicateParser substitute init\-block
> keys in the expression string, shorter keys that are prefixes of longer ones
> could match first and corrupt the substitution. Sorting keys by descending
> length before substituting ensures longer \(more specific\) keys are always
> replaced first, preventing this prefix collision.
> Discovered during the work on CAMEL\-22894 \(simple language parser
> hardening\).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)