mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-28 03:04:15 +00:00
Tweak error messages so LDAP password is not logged.
This commit is contained in:
parent
049fc6ef03
commit
4d85525e24
@ -105,9 +105,8 @@ class ldapDrivers
|
||||
if (!ldap_bind($this->connect,$config['bindDN'],$config['passDN'])){
|
||||
$bindDN = isset($config['bindDN']) ? $config['bindDN'] : 'anonymous';
|
||||
$passDN = isset($config['passDN']) ? $config['passDN'] : 'anonymous';
|
||||
dbg_error_log( "LDAP", "drivers_ldap : Failed to bind using bindDN of %s and passDN of %s", $bindDN, $passDN );
|
||||
$c->messages[] = sprintf(i18n( "drivers_ldap : Unable to bind to LDAP, check your bindDN >%s< >%s< in your configuration or if your server is reachable"),$bindDN );
|
||||
$c->messages[] = sprintf(i18n( "if your use OpenLDAP 2.X.X maybe, unable to connect to LDAP with port %s on host %s"), $port,$host );
|
||||
dbg_error_log( "LDAP", i18n('drivers_ldap : Failed to bind to host %1$s on port %2$s with bindDN of %3$s'), $host, $port $bindDN );
|
||||
$c->messages[] = i18n( 'drivers_ldap : Unable to bind to LDAP - check your configuration for bindDN and passDN, and that your LDAP server is reachable');
|
||||
$this->valid=false;
|
||||
return ;
|
||||
}
|
||||
@ -127,7 +126,7 @@ class ldapDrivers
|
||||
|
||||
$query = $this->ldap_query_all;
|
||||
|
||||
foreach($this->baseDNUsers as $baseDNUsers) {
|
||||
foreach($this->baseDNUsers as $baseDNUsers) {
|
||||
$entry = $query($this->connect,$baseDNUsers,$this->filterUsers,$attributes);
|
||||
|
||||
if (!ldap_first_entry($this->connect,$entry))
|
||||
@ -159,14 +158,14 @@ class ldapDrivers
|
||||
// We get the DN of the USER
|
||||
$query = $this->ldap_query_one;
|
||||
|
||||
foreach($this->baseDNUsers as $baseDNUsers) {
|
||||
foreach($this->baseDNUsers as $baseDNUsers) {
|
||||
$entry = $query($this->connect, $baseDNUsers, $filter, $attributes);
|
||||
|
||||
if (ldap_first_entry($this->connect,$entry) )
|
||||
break;
|
||||
|
||||
dbg_error_log( "LDAP", "drivers_ldap : Failed to find user with baseDN: %s", $baseDNUsers );
|
||||
}
|
||||
}
|
||||
|
||||
if ( !ldap_first_entry($this->connect, $entry) ){
|
||||
dbg_error_log( "ERROR", "drivers_ldap : Unable to find the user with filter %s",$filter );
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user