You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "oscerd (via GitHub)" <gi...@apache.org> on 2026/06/24 09:48:41 UTC
[PR] [backport camel-4.14.x] CAMEL-23765: remote-file consumers - contain localWorkDirectory downloads within the work directory [camel]
oscerd opened a new pull request, #24220:
URL: https://github.com/apache/camel/pull/24220
Backport of #24180 (CAMEL-23765) to `camel-4.14.x`.
## What
When `localWorkDirectory` is enabled, the remote-file consumers built the local work file path from the remote file name without ensuring it stayed within the configured work directory — a remote name containing `../` could resolve outside it. A shared `GenericFileHelper.jailToLocalWorkDirectory` check (`compactPath` + `startsWith`, mirroring the file producer's jail) is now applied to the temp and final files, **before `mkdirs`**, in `FtpOperations`, `SftpOperations`, `FilesOperations` and `SmbOperations`. It reuses the existing `jailStartingDirectory` option (default `true`).
## Scope notes
- **camel-mina-sftp does not exist on `camel-4.14.x`** (added in a later release), so the main PR's `MinaSftpOperations` change is not applicable here.
- **Source-only backport**: the main PR's `jailStartingDirectory` `producer`→`common` relabel and its regenerated metadata are intentionally omitted to keep the maintenance-branch change minimal; the upgrade-guide entry lives on `main`.
## Tests
- `GenericFileHelperTest` (2 tests) passes; the 4 components compile on `4.14.8-SNAPSHOT`.
---
_Claude Code on behalf of Andrea Cosentino_
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [backport camel-4.14.x] CAMEL-23765: remote-file consumers - contain localWorkDirectory downloads within the work directory [camel]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd merged PR #24220:
URL: https://github.com/apache/camel/pull/24220
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org