diff --git a/RELEASE_NOTES b/RELEASE_NOTES index a5108693..c23d2b17 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -1,3 +1,9 @@ +1.3.11: +------- + +- Obsoleted the LDAP port parameter. Specify the ldap host in the form + of protocol://hostname:port, eg. ldaps://ldap.yourdomain.com:636 + 1.3.10: ------- diff --git a/config.php.in b/config.php.in index 51ca77b3..5c6fd08a 100644 --- a/config.php.in +++ b/config.php.in @@ -82,7 +82,6 @@ $config['WKHTMLTOPDF_COMMAND'] = "wkhtmltopdf"; $config['ENABLE_LDAP_AUTH'] = 0; $config['LDAP_HOST'] = 'ldap.yourdomain.com'; -$config['LDAP_PORT'] = 389; $config['LDAP_HELPER_DN'] = 'cn=....'; $config['LDAP_HELPER_PASSWORD'] = 'xxxxxxx'; $config['LDAP_MAIL_ATTR'] = 'mail'; diff --git a/webui/model/user/auth.php b/webui/model/user/auth.php index 9e73f995..b5728051 100644 --- a/webui/model/user/auth.php +++ b/webui/model/user/auth.php @@ -212,7 +212,7 @@ class ModelUserAuth extends Model { if($ldap_host == '' || $ldap_helper_password == '') { return 0; } - $ldap = new LDAP($ldap_host, $ldap_port, $ldap_helper_dn, $ldap_helper_password); + $ldap = new LDAP($ldap_host, $ldap_helper_dn, $ldap_helper_password); if($ldap->is_bind_ok()) { @@ -221,7 +221,7 @@ class ModelUserAuth extends Model { if(isset($query->row['dn']) && $query->row['dn']) { $a = $query->row; - $ldap_auth = new LDAP($ldap_host, $ldap_port, $a['dn'], $password); + $ldap_auth = new LDAP($ldap_host, $a['dn'], $password); if(LOG_LEVEL >= NORMAL) { syslog(LOG_INFO, "ldap auth against '" . $ldap_host . "', dn: '" . $a['dn'] . "', result: " . $ldap_auth->is_bind_ok()); } @@ -478,7 +478,7 @@ class ModelUserAuth extends Model { if(LOG_LEVEL >= NORMAL) { syslog(LOG_INFO, "sso login: $sso_user"); } - $ldap = new LDAP(LDAP_HOST, LDAP_PORT, LDAP_HELPER_DN, LDAP_HELPER_PASSWORD); + $ldap = new LDAP(LDAP_HOST, LDAP_HELPER_DN, LDAP_HELPER_PASSWORD); if($ldap->is_bind_ok()) { diff --git a/webui/system/database/ldap.php b/webui/system/database/ldap.php index 83ebf50f..49f30ff6 100644 --- a/webui/system/database/ldap.php +++ b/webui/system/database/ldap.php @@ -6,9 +6,9 @@ class LDAP { private $link; private $bind; - public function __construct($ldaphost, $ldapport, $binddn, $bindpw) { + public function __construct($ldaphost, $binddn, $bindpw) { - $this->link = ldap_connect($ldaphost, $ldapport) or exit('Error: ldap_connect()'); + $this->link = ldap_connect($ldaphost) or exit('Error: ldap_connect()'); ldap_set_option($this->link, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option($this->link, LDAP_OPT_REFERRALS, 0);