Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-242

Method createServerSocket of FTPSSocketFactory will never be called and thus UseClientMode is incorrect in a secured ftp transfer using active mode.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None

      Description

      When the data channel is secured and we are using Active mode , we need to set UseClientMode to true in the FTP Client so even though the FtpServer is initiating the connection, he is the "server" in the SSL handshake.

      In the current code , this is done in the method init() called by createServerSocket() in FTPSSocketFactory. But this method is never called as we create ServerSockets using a ServerSocketFactory.

      The solution is to create a FTPSServerSocketFactory which takes the responsibility of creating ServerSockets.

      Fix provided.

        Attachments

        1. FTPSClient.patch
          0.6 kB
          David Latorre
        2. FTPSServerSocketFactory.java
          1 kB
          David Latorre
        3. FTPSSocketFactory.patch
          1 kB
          David Latorre

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dlatorre David Latorre
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: