Subject: | Empty scope interpreted as 'base' |
We are using Net::LDAP within the mailing list software Sympa
(http://www.sympa.org).
If performing a search with an empty "scope" parameter, the search()
function assumes the scope is "base" which is not appropriate in most
cases ; "sub" would be a more appropriate default.
Below is a code that demonstrates the problem :
my $ldap = Net::LDAP->new( 'ldap.cru.fr' ) or die "$@";
my $mesg = $ldap->bind();
$mesg = $ldap->search(base => 'ou=People,dc=cru,dc=fr',
scope => '',
filter => '(uid=myuser)' );
The script won't be able to access our server but if it could, it would
return no entry because the scope is inappropriate.