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

Backport OPENDJ-7176: Filters with malformed attribute descriptions cannot be parsed



    • Bug
    • Status: Done
    • Major
    • Resolution: Fixed
    • 6.5.0, 6.5.1, 6.5.2, 6.5.3
    • 6.5.4
    • core apis


      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



              ondrej.fuchsik Ondrej Fuchsik
              cjr Chris Ridd
              Chris Ridd Chris Ridd
              Ondrej Fuchsik Ondrej Fuchsik
              0 Vote for this issue
              2 Start watching this issue