Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-5558

SDK: LdapUrl is not IPv6 clean

    XMLWordPrintable

    Details

    • Bug
    • Status: Done
    • Major
    • Resolution: Fixed
    • 5.5.0, 6.0.0, 6.5.0
    • 6.5.0
    • core apis

      Description

      The LdapUrl.valueOf() method does not correctly parse IPv6 addresses.

      LdapUrl foo = LdapUrl.valueOf("ldap://[2001:470:1f09:8e7:95ef:465a:8ea3:792e]/");
      

      Fails with:

      Exception in thread "main" org.forgerock.i18n.LocalizedIllegalArgumentException: The provided string "ldap://[2001:470:1f09:8e7:95ef:465a:8ea3:792e]/" cannot be decoded as an LDAP URL because the port number portion 470:1f09:8e7:95ef:465a:8ea3:792e] cannot be decoded as an integer
      

      Note the server's LDAPURL.decode() method calls HostPort.valueOf() which seems to do the right thing with IPv6 addresses.

        Attachments

          Issue Links

            Activity

              People

              fabiop Fabio Pistolesi
              cjr Chris Ridd
              Fabio Pistolesi Fabio Pistolesi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: