Empty optional parameters of LDAP query are not interpreted as empty

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: 8, 9
    • Component/s: 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

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

                Created:
                Updated:
                Resolved: