Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8074761

Empty optional parameters of LDAP query are not interpreted as empty

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 8, 9
    • core-libs
    • b62
    • Verified

        RFC2255 [1] allows any of attribute, scope, filter and extension to be empty. Code in com.sun.jndi.ldap package expects empty values to be represented by null, but LdapURL parsing method leaves optional parameters as "" (empty string).

        Test URL: ldap://localhost:10389/ou=RefPeople,dc=example,dc=com????

        Expected result:
        ldapUrl.getAttributes() == null
        ldapUrl.getFilter() == null
        ldapUrl.getScope() == null
        ldapUrl.getExtension() == null

        Actual result:
        ldapUrl.getAttributes() == ""
        ldapUrl.getFilter() == ""
        ldapUrl.getScope() == ""
        ldapUrl.getExtension() == ""

        [1] https://tools.ietf.org/html/rfc2255#section-3

              omajid Omair Majid
              omajid Omair Majid
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: