diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Auth/Ldap.php | 6 | ||||
-rw-r--r-- | app/constants.php | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/app/Auth/Ldap.php b/app/Auth/Ldap.php index 5bb60275..82307e8c 100644 --- a/app/Auth/Ldap.php +++ b/app/Auth/Ldap.php @@ -136,6 +136,12 @@ class Ldap extends Base ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0); + ldap_set_option($ldap, LDAP_OPT_NETWORK_TIMEOUT, 1); + ldap_set_option($ldap, LDAP_OPT_TIMELIMIT, 1); + + if (LDAP_START_TLS && ! @ldap_start_tls($ldap)) { + die('Unable to use ldap_start_tls()'); + } return $ldap; } diff --git a/app/constants.php b/app/constants.php index aa417d88..d6a9fd46 100644 --- a/app/constants.php +++ b/app/constants.php @@ -22,6 +22,7 @@ defined('DB_NAME') or define('DB_NAME', 'kanboard'); defined('LDAP_AUTH') or define('LDAP_AUTH', false); defined('LDAP_SERVER') or define('LDAP_SERVER', ''); defined('LDAP_PORT') or define('LDAP_PORT', 389); +defined('LDAP_START_TLS') or define('LDAP_START_TLS', false); defined('LDAP_SSL_VERIFY') or define('LDAP_SSL_VERIFY', true); defined('LDAP_BIND_TYPE') or define('LDAP_BIND_TYPE', 'anonymous'); defined('LDAP_USERNAME') or define('LDAP_USERNAME', null); |