From 68db203c1816004f9899f04e108e0f4530299b60 Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Mon, 15 Feb 2010 12:27:36 -0500 Subject: import version 0.02 --- lib/DJabberd/Authen/LDAP.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/DJabberd/Authen/LDAP.pm b/lib/DJabberd/Authen/LDAP.pm index 9808fa8..3c06c03 100644 --- a/lib/DJabberd/Authen/LDAP.pm +++ b/lib/DJabberd/Authen/LDAP.pm @@ -18,10 +18,10 @@ DJabberd::Authen::LDAP - An LDAP authentication module for DJabberd =head1 VERSION -Version 0.01 +Version 0.02 =cut -our $VERSION = '0.01'; +our $VERSION = '0.02'; =head1 SYNOPSIS @@ -46,7 +46,9 @@ The Only LDAPMethod supported at the moment is rebind which performs a bind as L or does anonymous bind, then searches for the user using LDAPFilter and then will rebind as the found DN to verify the password. -LDAPFilter is an LDAP filter with a %u that will be substituted with the incoming userid +LDAPFilter is an LDAP filter substutions + - %u will be substituted with the incoming userid (w/o the domain) (ie. myuser) + - %d will be substituted with the incoming userid's domain (ie. mydoman.com) =head1 AUTHOR @@ -133,7 +135,9 @@ sub check_cleartext { } my $filter = $self->{'ldap_filter'}; + my $vhost = $conn->vhost->server_name; $filter =~ s/%u/$username/; + $filter =~ s/%d/$vhost/; $logger->info("Searching $filter on ".$self->{'ldap_basedn'}); my $srch = $ldap->search( base=>$self->{'ldap_basedn'}, -- cgit