Issue 5402 - Sets: Hyphens within attribute names considered as separate tokens
Summary: Sets: Hyphens within attribute names considered as separate tokens
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-06 13:38 UTC by norbert@rittel.de
Modified: 2014-08-01 21:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description norbert@rittel.de 2008-03-06 13:38:48 UTC
Full_Name: Norbert Rittel
Version: 2.3.27
OS: Mac OS X Server 10.5.2
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (217.91.71.78)


When using attribute names containing hyphens the Set code erroneously considers
the parts to either side of the hyphen as separate tokens.

For example a <by> clause like

    by set.exact="this/apple-keyword & user/apple-keyword" read

always yields an empty set. This means that on Apple Open Directory servers set
clauses canot be used with any Apple-supplied attribute as they all begin with
"apple-".

Pierangelo Masarati was so kind to verify that this bug is still present in the
latest release. Hopefully the fix is a simple diff that we can apply to the
older version shipping with Mac OS X Server, too. :-)

Comment 1 ando@openldap.org 2008-03-06 22:32:03 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 2 ando@openldap.org 2008-03-06 22:32:14 UTC
norbert@rittel.de wrote:

> When using attribute names containing hyphens the Set code erroneously considers
> the parts to either side of the hyphen as separate tokens.
> 
> For example a <by> clause like
> 
>     by set.exact="this/apple-keyword & user/apple-keyword" read
> 
> always yields an empty set. This means that on Apple Open Directory servers set
> clauses canot be used with any Apple-supplied attribute as they all begin with
> "apple-".

The code that parses attribute descriptions appears to be definitely
broken, since it does allow underscores but no hyphens, and it does not
allow digits in attribute descriptions (including OIDs).  This should be
fixed now in HEAD, and the patch

servers/slapd/sets.c 1.41 -> 1.42

seems to apply to current re24 and re23 without much hassle.

Please test, p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it
---------------------------------------


Comment 3 ando@openldap.org 2008-03-08 08:26:45 UTC
Since the ITS' purpose consists in helping tracking issues,
please keep it in CC in replies, otherwise you defeat its purpose.

Norbert Rittel wrote:

> Am 06.03.2008 um 23:32 schrieb Pierangelo Masarati:
> 
>> The code that parses attribute descriptions appears to be definitely
>> broken, since it does allow underscores but no hyphens, and it does not
>> allow digits in attribute descriptions (including OIDs).  This should be
>> fixed now in HEAD, and the patch
>>
>> servers/slapd/sets.c 1.41 -> 1.42
>>
>> seems to apply to current re24 and re23 without much hassle.
>>
>> Please test, p.
> 
> Wow, really great turnaround :-)
> 
> To test I've downloaded the current OpenLDAP sources used in Mac OS X
> 10.5.2 from Apple's site at
> 
> http://www.opensource.apple.com/darwinsource/10.5.2/
> 
> But unfortunately issuing a 'make' (on the unaltered source already)
> results in an error (config.log enclosed if you want to take a look).
> I've sent a follow-up to Apple, with A LOT of luck someone at
> engineering there will come back to me on that…
> 
> If you have access to a Mac OS X (Server) box you might want to give it
> a try, but I fully understand if this is not the platform you're working
> on ;-)

This error appears to have nothing to do with the proposed fix,
so you should rather post to OpenLDAP-software (and, only in case
another issue surfaces, file a separate ITS).

I do not develop on that platform, nor I have access to it, so
I'm afraid I can't help.

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it
---------------------------------------


Comment 4 Quanah Gibson-Mount 2008-05-05 23:54:02 UTC
changed notes
Comment 5 Quanah Gibson-Mount 2008-05-13 03:21:08 UTC
changed notes
changed state Test to Closed
Comment 6 OpenLDAP project 2014-08-01 21:04:13 UTC
fixed in HEAD
fixed in RE24