https://bugs.openldap.org/show_bug.cgi?id=10432
Issue ID: 10432 Summary: filter with typo'ed attribute name causes 0 results Product: OpenLDAP Version: 2.6.7 Hardware: x86_64 OS: Linux Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: slapd Assignee: bugs@openldap.org Reporter: simon.leary42@proton.me Target Milestone: ---
Here is a filter for posixAccount entries missing the sshPublicKey attribute:
``` (&(objectClass=posixAccount)(!(sshPublicKey=*))) ```
It works normally.
If I made a typo and instead searched for entries missing some other bogus attribute name:
``` (&(objectClass=posixAccount)(!(ssshPublicKey=*))) ```
I get 0 results.
None of my posixAccounts have an `ssshPublicKey` attribute, so I would think that the right half of my filter should be always true. So every posixAccount should be returned. Am I wrong to think that?
Note: the `!(foo=*)` syntax comes from [stackoverflow](https://stackoverflow.com/questions/14441529/ldap-filter-for-blank-empty-att...)
https://bugs.openldap.org/show_bug.cgi?id=10432
simon.leary42@proton.me changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|filter with typo'ed |filter with typo'ed |attribute name causes 0 |attribute name returns 0 |results |results
https://bugs.openldap.org/show_bug.cgi?id=10432
Ondřej Kuzník ondra@mistotebe.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID
--- Comment #1 from Ondřej Kuzník ondra@mistotebe.net --- Unfortunately yes, if you review RFC 4511, section 4.5.1.7, when using an invalid attribute description:
A filter item evaluates to Undefined when the server would not be able to determine whether the assertion value matches an entry.
...
For example, if a server did not recognize the attribute type shoeSize, the filters (shoeSize=*), (shoeSize=12), (shoeSize>=12), and (shoeSize<=12) would each evaluate to Undefined.
From that, an Undefined value will negate to Undefined, then through an AND can only evaluate to FALSE or Undefined, neither matching any entry.
https://bugs.openldap.org/show_bug.cgi?id=10432
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED Keywords|needs_review |