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

FTPSClient converts hostname to IP, making hostname verification difficult

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.7
    • 3.7.2
    • FTP
    • None

    Description

      Related to NET-593, FTPS converts the provided hostname into an IP address before attempting the connection.

       

      This means that a registered hostname verifier gets passed the IP address, instead of the hostname, and is likely to fail.

       

      I believe the issue is in FTPSClient.java, in sslNegotiation.

       

      at line 294 we call the hostnameverifier, but using socket.getInetAddress().getHostAddress() - this will return us the IP address of the socket. The certificate presented by the server will almost certainly not have the IP address as a valid name and therefore hostname verification will likely fail.

       

      We ought to use the hostname the user provided, if possible.

      Attachments

        Activity

          People

            Unassigned Unassigned
            davenice Dave Nice
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: