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

   Jira: https://issues.apache.org/jira/browse/CAMEL-26066
   
   Backport of #29285 to `camel-4.18.x` (cherry-pick of b2e39a7c0951).
   
   The scp producer now refuses a file name with a line feed or a NUL 
character, in the file name or in one of its directories, with a 
`GenericFileOperationFailedException`. The check runs before scp is started on 
the remote host, so nothing is written there. `storeFileDirectly`, used for the 
checksum file, does the same check. Any other character, such as a carriage 
return or a tab, is sent as before.
   
   Conflicts, all in the docs:
   - `scp-component.adoc`: main adds the note to the "Usage" section, which 
does not exist on this branch. The note, the same three lines as on main, is 
added after the file name paragraph of "URI format" instead.
   - The catalog copy of `scp-component.adoc`, 
`camel-4x-upgrade-guide-4_22.adoc` and `camel-4x-upgrade-guide-4_24.adoc` do 
not exist on this branch, so they are left out.
   - The entry for 4.18.6 in `camel-4x-upgrade-guide-4_18.adoc` applies as on 
main.
   
   The Java code and the test apply unchanged. The new test uses only JUnit and 
the existing `ScpServerTestSupport`, so it runs on camel-test-junit5 as it is. 
The doc note is in another section than on main, so this is not a straight 
cherry-pick, and it needs a normal review.
   
   Tests: `components/camel-jsch` `mvn verify` on this branch: BUILD SUCCESS, 
30 unit tests (16 in the new `ScpFileNameControlCharTest`, 3 already 
`@Disabled`) and 7 ITs, 0 failures. Without the change to `ScpOperations`, 8 of 
the 16 tests of `ScpFileNameControlCharTest` fail on this branch, as on main.
   
   _Claude Code on behalf of Federico Mariani_
   


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