Changed the module to use the LDAP Connection authentication parameters, if specified, for searching when authenticating anonymous registrations
This commit is contained in:
parent
85f2c3d65a
commit
9afcd91f96
1 changed files with 6 additions and 1 deletions
|
|
@ -55,7 +55,12 @@ sub _isValidLDAPUser {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ldap = Net::LDAP->new($uri->host, (port=>$uri->port))) {
|
if ($ldap = Net::LDAP->new($uri->host, (port=>$uri->port))) {
|
||||||
if ($ldap->bind) {
|
if($connection->{connectDn}) {
|
||||||
|
$auth = $ldap->bind(dn=>$connection->{connectDn}, password=>$connection->{identifier});
|
||||||
|
}else{
|
||||||
|
$auth = $ldap->bind;
|
||||||
|
}
|
||||||
|
if ($auth) {
|
||||||
$search = $ldap->search ( base=>$uri->dn, filter=>$connection->{ldapIdentity}."=".$session{form}{'authLDAP_ldapId'});
|
$search = $ldap->search ( base=>$uri->dn, filter=>$connection->{ldapIdentity}."=".$session{form}{'authLDAP_ldapId'});
|
||||||
if (defined $search->entry(0)) {
|
if (defined $search->entry(0)) {
|
||||||
if ($connection->{ldapUserRDN} eq 'dn') {
|
if ($connection->{ldapUserRDN} eq 'dn') {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue