On 28/1/04 8:35 pm, Graham Barr <[EMAIL PROTECTED]> wrote:

> Begin forwarded message:
>> From: Uri Guttman <[EMAIL PROTECTED]>
>> Date: 28 January 2004 00:05:16 GMT
>> To: [EMAIL PROTECTED]
>> Subject: uninit bug in Net::LDAP
>> Message-Id: <[EMAIL PROTECTED]>
>> 
>> 
>> hi graham,
>> 
>> i am using Net::LDAP for a project and i found a minor bug in the
>> module. if i do a search call and don't pass in a filter, it barfs out
>> 
>> Use of uninitialized value in substitution (s///) at
>> /usr/local/lib/perl5/site_perl/5.6.1/Net/LDAP/Filter.pm line 167,
>> <DATA>
>> line 283.
>> 
>> the code there is stripping leading white space off the filter but of
>> course if none was passed in, it spits out the undef value warning. the
>> docs don't seem to say filter is required (i am not an ldap expert and
>> someone else is helping me with this). so i think the search method
>> should set the filter to '' or return an error if filter is not set.

Filters are mandatory in the protocol, so the search method should return an
error. (Using some kind of default filter is an interesting idea but could
be really expensive on some server configurations, so I think an error's
safer.)

Good catch, thanks for the bug report.

Cheers,

Chris

Reply via email to