|
From: Chris R. <chr...@ma...> - 2003-03-14 11:25:59
|
On 14/3/03 11:04 am, Graham Barr <gb...@po...> wrote:
> ----- Forwarded message from "Cornily, Jacques"
> <jac...@ic...> -----
>
> Date: Fri, 14 Mar 2003 11:54:01 +0100
> To: "'gb...@po...'" <gb...@po...>
> From: "Cornily, Jacques" <jac...@ic...>
> Subject: Filter/Bug ?
>
> Bonjour
> I am currently using NEt:LDAP.
> I am getting stuck in the following case
> i am trying to match a phone number
> with
> ...
> $correct_filter->parse("(telephonenumber=0711 17-20350)");
> my $parsed_filter = $correct_filter;
>
> when i print the content of $correct_filter hash i get this
> which is i think normal
> equalityMatch for HASH(0x2089f94)
> assertionValue >0711 17-20350<
> attributeDesc >telephonenumber<
>
> If i change the filter and this is my case i am getting
> $correct_filter->parse("(telephonenumber=(0711) 17-20350)");
>
> In this case the filter hash has no assertionValue and so on
> thus the search fails
>
> Can you help ?
>
> Merci
> Jacques Cornily
Hi Jacques,
Since ( and ) are special in the string representation of search filters,
you will probably have to hex-escape them (ie "\28" for "(" and "\29" for
")") when they're inside an assertion value. See RFC 2254 section 4.
NB the telephone number matching rule ignores spaces and "-"s.
Cheers,
Chris
|