[
https://issues.apache.org/jira/browse/CAMEL-5574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13559647#comment-13559647
]
Claus Ibsen commented on CAMEL-5574:
------------------------------------
Aki,
Yeah its important that the code is similar between ftp and s-ftp. eg the code
in FtpOperations and SftpOperations is the same, except for when they use the
native ftp client. This ensures that functionality works the same. As well when
we change/add new options etc then its easier to implement in both as its the
same. Also the regular ftp tests will sort-of test sftp as well, as the code is
following the same pattern.
In the early days we did not have a Java SFTP library to test against, so we
did not have any SFTP tests. But recently we have a SFTP library now (though
not sure if it works as well as a real SFTP server). And therefore we got a bit
of sftp tests also.
Also in the earlier days the SFTP tests caused the CI servers to hang. But just
recently we enabled the tests again. And it seems the SFTP library is more
stable and allow CI servers to not hang anymore.
> camel-sftp's stepwise behavior to walk up and down relatively to avoid
> potential traversal issues
> -------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5574
> URL: https://issues.apache.org/jira/browse/CAMEL-5574
> Project: Camel
> Issue Type: Bug
> Components: camel-ftp
> Affects Versions: 2.10.1
> Reporter: Aki Yoshida
> Assignee: Willem Jiang
> Fix For: 2.9.4, 2.10.2, 2.11.0
>
> Attachments: trunk-camel-ftp.diff
>
>
> I am having a directory traversal problem using the stepwise mode of
> camel-sftp at the producer side. Basically, it can walk down the path from
> the starting directory to the walking directory, but it cannot go back
> correctly to the original starting directly. The server is SSH-2.0-Cleo
> VLProxy/3.0.1 SSH FTP server.
> I saw a related JIRA issue CAMEL-3309 that describes some issues in the
> stepwise traversal and some background to this related problem.
> My question is on the part that changes the working directory back to the
> original starting folder. I am wondering why we are using stepwise traversal
> from the ancestor directory towards the starting child directory, instead of
> moving upwards relatively from the working directory back to the starting
> directory. This reverse traversal does not require accessing the ancestry
> path above the staring directory (hence, not affected by the accessing
> problem). And in fact, I think this reverse stepwise traversal seems more
> natural order than doing stepwise traversal each time from top down. How do
> you think?
> I have made a change that implements this reverse stepwise traversal in
> SftpOperations and also made a few minor improvement changes.
> This changed version passes all the existing tests and works also against the
> above server.
> I am attaching a patch file for this change. I would appreciate if you can
> comment on it.
> Thanks.
> regards, aki
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira