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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to