Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Filters should still apply with a scope of 'base'

From RFC 4511:

    4.5.1.2.  SearchRequest.scope

       Specifies the scope of the Search to be performed.  The semantics (as
       described in [X.511]) of the defined values of this field are:

          baseObject: The scope is constrained to the entry named by
          baseObject.

and

    4.5.1.7.  SearchRequest.filter

       A filter that defines the conditions that must be fulfilled in order
       for the Search to match a given entry.

Nowhere does the RFC specify that the baseObject is excluded from the
filters, and doing so would render the 'base' scope not nearly as
useful.
  • Loading branch information...
commit d1bb1449815489beb7f88e424799b6de1a79aee3 1 parent 0a744c6
@tsibley tsibley authored
Showing with 4 additions and 6 deletions.
  1. +4 −6 lib/Net/LDAP/Server/Test.pm
View
10 lib/Net/LDAP/Server/Test.pm
@@ -135,13 +135,11 @@ Only one user-level method is implemented: new().
my @attrs = @{$reqData->{attributes} || []};
my @filters = ();
- if ( $scope ne 'base' ) {
- if ( exists $reqData->{filter} ) {
+ if ( exists $reqData->{filter} ) {
- push( @filters,
- bless( $reqData->{filter}, 'Net::LDAP::Filter' ) );
+ push( @filters,
+ bless( $reqData->{filter}, 'Net::LDAP::Filter' ) );
- }
}
#warn "stored Data: " . Data::Dump::dump \%Data;
@@ -223,7 +221,7 @@ Only one user-level method is implemented: new().
}
#warn "matched $match";
- if ( $match == scalar(@filters) ) { # or $dn eq $base ) {
+ if ( $match == scalar(@filters) ) {
# clone the entry so that client cannot modify %Data
my $result = $entry->clone;
Please sign in to comment.
Something went wrong with that request. Please try again.