[OPENDJ-7238] Backport OPENDJ-7176: Filters with malformed attribute descriptions cannot be parsed Created: 01/Jun/20  Updated: 28/Aug/20  Resolved: 28/Aug/20

Status: Done
Project: OpenDJ
Component/s: core apis
Affects Version/s: 6.5.2, 6.5.1, 6.5.0, 6.5.3
Fix Version/s: 6.5.4

Type: Bug Priority: Major
Reporter: Chris Ridd Assignee: Ondrej Fuchsik
Resolution: Fixed Votes: 0
Labels: Verified, release-notes

Issue Links:
is a backport of OPENDJ-7176 Filters with malformed attribute desc... Done
Story Points: 2
Dev Assignee: Chris Ridd
QA Assignee: Ondrej Fuchsik


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. 


Comment by Ondrej Fuchsik [ 28/Aug/20 ]

Verified the check is not done now with 6.5.4-SNAPSHOT rev. 63a250f22a6.

Generated at Tue Oct 27 06:28:38 UTC 2020 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.