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

Equality filter with an invalid attribute value evaluates as unindexed rather than an empty result set

    Details

    • Support Ticket IDs:
    • Sprint:
      DJ Sustaining Sprint 27

      Description

      Steps to produce:

      1) Install OpenDJ with test users.
      2) Run a search:

      ./ldapsearch -b "dc=example,dc=com" "mail=test\ff"
      

      (mail should have an equality index and 'test\ff' is invalid because \ff isn't allowed in an IA5String)

      Result:

      If user has unindexed-search privilege, every entry will be checked even though it's certain that nothing will match.

      If user hasn't got the unindexed-search privilege, they will receive:

      SEARCH operation failed
      Result Code:  50 (Insufficient Access Rights)
      Additional Information:  You do not have sufficient privileges to perform an unindexed search
      

      In 2.6.x this behaviour was different, the invalid filter would evaluate to an empty result set rather than completely unindexed.

      A quick initial debug shows that the following change would revert the behaviour (in this case) back to match 2.6.x:

      --- a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/AttributeIndex.java
      +++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/AttributeIndex.java
      @@ -664,7 +664,7 @@ class AttributeIndex implements ConfigurationChangeListener<BackendIndexCfg>, Cl
           catch (DecodeException e)
           {
             logger.traceException(e);
      -      return newUndefinedSet();
      +      return newDefinedSet(0);
           }
         }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ian.packer Ian Packer [X] (Inactive)
                Reporter:
                ian.packer Ian Packer [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: