Subject: | Empty filter during the search should be acceptable |
I would like to make a search knowing only the DN of the record, I would
like to find. So I do:
$ldap->search('base' => $dn, 'scope' => 'base');
The call dies with message:
Bad filter at my.pl line 156
As a workaround I've defined the catch-all filter:
$ldap->search('base' => $dn, 'filter' => '(cn=*)', 'scope' => 'base');
I think, this is dummy. search() should accept empty filter and possibly
handle this situation somehow internally. At least ldapsearch utility
works fine with no filter defined (returns all records).