diff options
author | Edward Rudd | 2010-02-15 12:27:36 -0500 |
---|---|---|
committer | Edward Rudd | 2010-02-15 12:27:36 -0500 |
commit | 68db203c1816004f9899f04e108e0f4530299b60 (patch) | |
tree | 1f729b0d96a483da673c2ac80ce5c85bd3bcb690 /lib/DJabberd/Authen/LDAP.pm | |
parent | 20fd1b9f6f15f7864620ff91ff1eb257ad5ccb5a (diff) |
import version 0.020.02
Diffstat (limited to 'lib/DJabberd/Authen/LDAP.pm')
-rw-r--r-- | lib/DJabberd/Authen/LDAP.pm | 10 |
1 files changed, 7 insertions, 3 deletions
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 | |||
18 | 18 | ||
19 | =head1 VERSION | 19 | =head1 VERSION |
20 | 20 | ||
21 | Version 0.01 | 21 | Version 0.02 |
22 | =cut | 22 | =cut |
23 | 23 | ||
24 | our $VERSION = '0.01'; | 24 | our $VERSION = '0.02'; |
25 | 25 | ||
26 | =head1 SYNOPSIS | 26 | =head1 SYNOPSIS |
27 | 27 | ||
@@ -46,7 +46,9 @@ The Only LDAPMethod supported at the moment is rebind which performs a bind as L | |||
46 | or does anonymous bind, then searches for the user using LDAPFilter and then will rebind | 46 | or does anonymous bind, then searches for the user using LDAPFilter and then will rebind |
47 | as the found DN to verify the password. | 47 | as the found DN to verify the password. |
48 | 48 | ||
49 | LDAPFilter is an LDAP filter with a %u that will be substituted with the incoming userid | 49 | LDAPFilter is an LDAP filter substutions |
50 | - %u will be substituted with the incoming userid (w/o the domain) (ie. myuser) | ||
51 | - %d will be substituted with the incoming userid's domain (ie. mydoman.com) | ||
50 | 52 | ||
51 | =head1 AUTHOR | 53 | =head1 AUTHOR |
52 | 54 | ||
@@ -133,7 +135,9 @@ sub check_cleartext { | |||
133 | } | 135 | } |
134 | 136 | ||
135 | my $filter = $self->{'ldap_filter'}; | 137 | my $filter = $self->{'ldap_filter'}; |
138 | my $vhost = $conn->vhost->server_name; | ||
136 | $filter =~ s/%u/$username/; | 139 | $filter =~ s/%u/$username/; |
140 | $filter =~ s/%d/$vhost/; | ||
137 | $logger->info("Searching $filter on ".$self->{'ldap_basedn'}); | 141 | $logger->info("Searching $filter on ".$self->{'ldap_basedn'}); |
138 | my $srch = $ldap->search( | 142 | my $srch = $ldap->search( |
139 | base=>$self->{'ldap_basedn'}, | 143 | base=>$self->{'ldap_basedn'}, |