From 1bdbe5b5e43424c64fee0223ca117c5a9c15e65a Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sat, 3 Nov 2018 15:33:37 +0100 Subject: [PATCH] system: more ldap-totp --- src/etc/inc/auth.inc | 4 ++-- src/www/diag_authentication.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/etc/inc/auth.inc b/src/etc/inc/auth.inc index cba9f3d6f..979921fd7 100644 --- a/src/etc/inc/auth.inc +++ b/src/etc/inc/auth.inc @@ -727,7 +727,7 @@ function auth_get_authserver($name) if (isset($config['system']['authserver']) && is_array($config['system']['authserver'])) { foreach ($config['system']['authserver'] as $authcfg) { if ($authcfg['name'] == $name) { - if ($authcfg['type'] == 'ldap') { + if ($authcfg['type'] == 'ldap' || $authcfg['type'] == 'ldap-totp') { // let's try to avoid regenerating the ldap url in every function. if (strstr($authcfg['ldap_urltype'], "Standard")) { $authcfg['ldap_full_url'] = "ldap://"; @@ -785,7 +785,7 @@ function get_authenticator($authcfg = NULL) if ($authcfg['type'] == 'local') { // avoid gettext type issues on Local Database, authenticator should always be named "Local Database" $authName = 'Local Database'; - } elseif ($authcfg['type'] == 'ldap') { + } elseif ($authcfg['type'] == 'ldap' || $authcfg['type'] == 'ldap-totp') { // temporary fix, ldap handler doesn't do this init yet. ldap_setup_caenv($authcfg); } diff --git a/src/www/diag_authentication.php b/src/www/diag_authentication.php index e8321a7a6..d5a964778 100644 --- a/src/www/diag_authentication.php +++ b/src/www/diag_authentication.php @@ -51,7 +51,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { if ($authcfg['type'] == 'local') { // avoid gettext type issues on Local Database, authenticator should always be named "Local Database" $authName = 'Local Database'; - } elseif ($authcfg['type'] == 'ldap') { + } elseif ($authcfg['type'] == 'ldap' || $authcfg['type'] == 'ldap-totp') { // temporary fix, ldap handler doesn't do this init yet. ldap_setup_caenv($authcfg); }