You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (Jira)" <ji...@apache.org> on 2026/09/25 09:02:00 UTC
[jira] [Updated] (CAMEL-24894) camel-docling: make output path handling consistent with input path and custom-argument handling
[ https://issues.apache.org/jira/browse/CAMEL-24894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrea Cosentino updated CAMEL-24894:
-------------------------------------
Fix Version/s: 4.18.5
4.22.2
4.23.0
> camel-docling: make output path handling consistent with input path and custom-argument handling
> ------------------------------------------------------------------------------------------------
>
> Key: CAMEL-24894
> URL: https://issues.apache.org/jira/browse/CAMEL-24894
> Project: Camel
> Issue Type: Improvement
> Components: camel-docling
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 4.18.5, 4.22.2, 4.23.0
>
>
> DoclingProducer handles the path-bearing values it forwards to the docling CLI inconsistently:
> * Input file paths (header/body) are normalized and, when {{inputBaseDirectory}} is configured, confined to that directory ({{resolveWithinInputBaseDirectory}}).
> * Custom CLI argument values are normalized and checked via {{validatePathSafety}}.
> * The {{CamelDoclingOutputFilePath}} header, however, is passed straight to the {{--output}} flag in {{addOutputDirectoryArguments}} with no normalization and no containment option.
> There is also no {{outputBaseDirectory}} counterpart to {{inputBaseDirectory}}, so a deployment cannot confine where conversion output is written even when it wants to.
> h3. Proposed change
> * Add an optional {{outputBaseDirectory}} endpoint option mirroring {{inputBaseDirectory}}.
> * In {{addOutputDirectoryArguments}}, normalize the {{CamelDoclingOutputFilePath}} value and, when {{outputBaseDirectory}} is set, confine it to that directory (reject values resolving outside) - consistent with input-path handling.
> * Apply the same path-safety normalization already used for custom-argument values.
> * Document the new option/behavior in the component docs and the 4.23 upgrade guide.
> * Add a unit test covering normalization and containment of the output path.
> Affected: {{DoclingProducer.addOutputDirectoryArguments}}, {{DoclingConfiguration}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)