Skip Menu |

This queue is for tickets about the DJabberd-Authen-LDAP CPAN distribution.

Report information
The Basics
Id: 39077
Status: resolved
Worked: 10 min
Priority: 0/
Queue: DJabberd-Authen-LDAP

People
Owner: URKLE [...] cpan.org
Requestors: gavin [...] openfusion.com.au
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.02
Fixed in: (no value)



Subject: Buglets in DJabberd::Authen::LDAP
There are a couple of buglets in DJabberd::Authen::LDAP 0.02, fixed in the attached patch. The first causes D::A::L to fail with "Invalid LDAP Authentication method" if LDAPMethod is explicitly set to 'rebind', instead of being omitted. I don't remember the impact of the unbind vs. bind, but bind() looks the correct call, I think?
Subject: djabberd-authen-ldap-bind.patch
--- LDAP.pm.dist 2007-12-24 13:12:38.000000000 +1100 +++ LDAP.pm 2007-12-24 15:01:25.000000000 +1100 @@ -96,8 +96,8 @@ my $self = shift; $logger->error_die("Invalid LDAP URI") unless $self->{ldap_uri}; $logger->error_die("No LDAP BaseDN Specified") unless $self->{ldap_basedn}; - if (not defined $self->{'ldap_method'}) { $self->{'ldap_type'} = 'rebind'; } - for ($self->{ldap_type}) { + if (not defined $self->{'ldap_method'}) { $self->{'ldap_method'} = 'rebind'; } + for ($self->{ldap_method}) { if (/^rebind$/) { # check additional required params $logger->error_die("Must specify filter with userid as %u") unless $self->{ldap_filter}; @@ -131,7 +131,7 @@ $cb->decline; } } else { - $ldap->unbind; + $ldap->bind; } my $filter = $self->{'ldap_filter'};
Will include this patch in the next release.