Adriano Machado created CAMEL-23799:
---------------------------------------

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


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)

Reply via email to