oscerd opened a new pull request, #26738: URL: https://github.com/apache/camel/pull/26738
## Summary `DoclingProducer` validates path-like values supplied through the `CamelDoclingCustomArguments` header before appending them to the docling CLI command (`validateCustomArguments` → `validatePathSafety`). `validatePathSafety` rejected relative traversal (`../`, `..\`) and any `..` component remaining after normalization, but did not constrain **absolute** paths — an absolute value (e.g. for a flag such as `--artifacts-path`) passed validation unchanged, because `Path` iteration does not yield the root component. This change aligns the custom-argument path check with the containment already applied to input paths via `resolveWithinInputBaseDirectory()`. ## Changes - `validatePathSafety`: add an explicit `Paths.get(value).isAbsolute()` rejection, placed after the relative-traversal check so the existing messages are preserved, computing the `Path` once. - Tests: add cases for a plain absolute path in both the `--flag value` and `--flag=value` forms in `DoclingCustomArgsValidationTest` (existing tests covered only relative traversal). ## Testing `mvn -pl components/camel-ai/camel-docling test -Dtest=DoclingCustomArgsValidationTest` → 17/17 passing. JIRA: https://issues.apache.org/jira/browse/CAMEL-24893 --- _Claude Code on behalf of Andrea Cosentino (@oscerd)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
