Croway opened a new pull request, #29319: URL: https://github.com/apache/camel/pull/29319
Jira: https://issues.apache.org/jira/browse/CAMEL-26066 Backport of #29285 to `camel-4.22.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` and its catalog copy: 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. - `camel-4x-upgrade-guide-4_24.adoc` does not exist on this branch, so it is left out. - `camel-4x-upgrade-guide-4_18.adoc`: the copy of this page on this branch has no 4.18.6 section, so the entry is left out, as in earlier backports to this branch (for example #29169). The entry for 4.18.6 is on `main` and in the `camel-4.18.x` backport. - The entry for 4.22.3 in `camel-4x-upgrade-guide-4_22.adoc` applies as on main. The Java code and the test apply unchanged. 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]
