Commit f6301ca7 authored by Ad Schellevis's avatar Ad Schellevis

crashreport, ldap_set_option(): supplied argument is not a valid ldap link...

crashreport,   ldap_set_option(): supplied argument is not a valid ldap link resource in /usr/local/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php on line 213
parent ba9a7eca
......@@ -210,9 +210,9 @@ class LDAP implements IAuthConnector
{
$this->closeLDAPHandle();
$this->ldapHandle = @ldap_connect($bind_url);
ldap_set_option($this->ldapHandle, LDAP_OPT_NETWORK_TIMEOUT, $timeout);
if ($this->ldapHandle !== false) {
ldap_set_option($this->ldapHandle, LDAP_OPT_NETWORK_TIMEOUT, $timeout);
ldap_set_option($this->ldapHandle, LDAP_OPT_REFERRALS, 0);
ldap_set_option($this->ldapHandle, LDAP_OPT_DEREF, LDAP_DEREF_SEARCHING);
ldap_set_option($this->ldapHandle, LDAP_OPT_PROTOCOL_VERSION, (int)$this->ldapVersion);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment