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

Filters with malformed attribute descriptions cannot be parsed


    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.5.2, 6.5.1, 6.5.0, 6.5.3
    • Fix Version/s: 6.5.4, 7.0.0
    • Component/s: core apis
    • Labels:


      ldapsearches with a search filter that has “_” (underscore) are working in previous versions of DS (3.x), but failing in 6.5.x with the following message:

      The attribute description “mobile_login” could not be parsed because it contains an invalid character “” at position 6_ 

      If the ldapsearches are performed from AM => DS, the following is observed:   

      1. AM 13.5.1 to DS 3.0 works (when used attribute “mobile_login” as search filter)
      2. AM 13.5.1 to DS 6.5.x fails (when used attribute “mobile_login” as search filter)
      3. AM 6.5.x to DS 6.5.x fails (when used attribute “mobile_login” as search filter)
      4. AM 6.5.x to DS 3.0 fails (when used the attribute “mobile_login” as search filter)

      A possible solution as per Chris Ridd's notes:
      The 6.5 server code only allows well-formed attribute descriptions when parsing a filter. I think we could safely allow malformed attribute descriptions here.

      From opendj-core/.../AttributeDescription.java:

      static String validateAttributeDescription(final String attributeDescription) {
       if (attributeDescription == null) {
       // Some Filter allows null attribute description and these must perform the null check them-self.
       return null;
       valueOf0(null, attributeDescription, false, NoOpFactory.INSTANCE);
       return attributeDescription;

      Change the 'false' to a 'true'.

      N.B! This has not been tested and setting the flag from false to true will also change the behavior of the server, which may have a detrimental effect. 
      This affects the client SDK as well, so ldapsearch (and AM) will not even send such a search filter to the server. 



          Issue Links



              • Assignee:
                ondrej.fuchsik Ondrej Fuchsik
                alex.belovski Alex Belovski
                Dev Assignee:
                Chris Ridd
                QA Assignee:
                Ondrej Fuchsik
              • Votes:
                0 Vote for this issue
                5 Start watching this issue


                • Created: