You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2023/07/12 12:54:00 UTC
[jira] [Comment Edited] (NET-723) FTPSClient cannot transfer files to FileZilla Server 1.7.2
[ https://issues.apache.org/jira/browse/NET-723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17742415#comment-17742415 ]
Gary D. Gregory edited comment on NET-723 at 7/12/23 12:53 PM:
---------------------------------------------------------------
[~tstellin]
Thank you for your report.
Feel free to provide a PR on GitHub so we can see if your proposal has side effects.
TY!
was (Author: garydgregory):
[~tstellin]
Feel free to provide a PR on GitHub so we can see if your proposal has side effects.
TY!
> FTPSClient cannot transfer files to FileZilla Server 1.7.2
> ----------------------------------------------------------
>
> Key: NET-723
> URL: https://issues.apache.org/jira/browse/NET-723
> Project: Commons Net
> Issue Type: Bug
> Components: FTP
> Affects Versions: 3.9.0
> Reporter: Tobin Stelling
> Priority: Major
>
> The FTPSClient in the commons-net library cannot transfer files over an FPTS connection to FileZilla Server v1.7.2.
>
> To reproduce, install FileZilla Server v1.7.2. Set Minimum Allows TLS version to 1.2. Use a self signed cert. Configure listener ports as necessary.
>
> Write a small Java program to that uses FTPSClient to connect to your FileZilla server.
>
> {code:java}
> FTPSClient ftpsClient = new FTPSClient();
> ftpsClient.connect(hostname, port);
> ftpsClient.parsePBSZ(0L);
> ftpsClient.execPROT("P");
> ftpsClient.login(username,password);
> ftpsClient.enterLocalPassiveMode();
> ftpsClient.storeFile(file.getFileName().toString(), inputStream);
> {code}
>
> The storeFile operation fails with "java.net.SocketException: Broken pipe".
> The FileZilla Server logs report this error:
> {code:java}
> 2023-07-12T12:33:25.852Z !! [FTP Session 3 127.0.0.1 tstellin] TLS session of data connection not resumed.
> 2023-07-12T12:33:25.852Z << [FTP Session 3 127.0.0.1 tstellin] 425 Unable to build data connection: TLS session of data connection not resumed.{code}
>
> I found a work-around that extends FTPSClient and overrides _prepareDataSocket_(Socket). You tie the TLS session from the control connection to the data connection. Unfortunately it uses reflection to get at private fields in SSLSessionContext, so it feels like a hack.
> This ticket requests that FPSClient be upgraded to re-use the TLS session from the control connection in the data connection.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)