diff options
Diffstat (limited to 'lib/DJabberd')
-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'}, |