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:44:58 UTC

[PR] [backport camel-4.18.x] CAMEL-23765: remote-file consumers - contain localWorkDirectory downloads within the work directory [camel]

oscerd opened a new pull request, #24219:
URL: https://github.com/apache/camel/pull/24219

   Backport of #24180 (CAMEL-23765) to `camel-4.18.x`.
   
   ## What
   
   When `localWorkDirectory` is enabled, the remote-file consumers built the local work file path from the remote file name (`target.getRelativeFilePath()`) without ensuring the result 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 both the in-progress temp file and the final file, **before `mkdirs`**, in `FtpOperations`, `SftpOperations`, `MinaSftpOperations`, `FilesOperations` and `SmbOperations`. It reuses the existing `jailStartingDirectory` option (default `true`).
   
   ## Scope note
   
   **Source-only backport.** The main PR also relabelled `jailStartingDirectory` from `producer` to `common` and regenerated catalog/JSON/endpoint-dsl metadata for all file components; that cosmetic change and its wide metadata churn are intentionally omitted here to keep the maintenance-branch change minimal. The upgrade-guide entry lives on `main`.
   
   ## Tests
   
   - `GenericFileHelperTest` (2 tests) passes; the 5 components compile on `4.18.3-SNAPSHOT`.
   - Existing localWorkDirectory ITs cover legitimate-download regression.
   
   ---
   _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.18.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 #24219:
URL: https://github.com/apache/camel/pull/24219


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