Claus Ibsen created CAMEL-27250:
-----------------------------------

             Summary: camel-docling - the CamelDoclingOutputFilePath header 
must be a relative path unless outputBaseDirectory is set
                 Key: CAMEL-27250
                 URL: https://issues.apache.org/jira/browse/CAMEL-27250
             Project: Camel
          Issue Type: Improvement
          Components: camel-docling
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
             Fix For: 4.24.0


When the outputBaseDirectory option is not set, the CamelDoclingOutputFilePath 
header is only normalized, so it can name any directory, as an absolute path or 
with ../ segments, and the docling CLI writes its output there.

The CamelDoclingCustomArguments header already refuses absolute paths and ../ 
segments with no option to set. The output header should follow the same rule 
by default:

* Without outputBaseDirectory, CamelDoclingOutputFilePath must be a relative 
path that stays relative after normalizing (no leading ../). Otherwise the 
exchange fails.
* With outputBaseDirectory set, the header keeps the current behaviour: it is 
resolved against that directory and must stay inside it.

Routes that set an absolute output directory in the header set 
outputBaseDirectory to a parent of those directories. This goes in the 4.24 
upgrade guide.




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to