Skip to content
Snippets Groups Projects
Commit aa7723a4 authored by Tim van Dijen's avatar Tim van Dijen Committed by Thijs Kinkhorst
Browse files

Fix issue #571: adhere to authsource referrals-setting (#587)

parent f5f8e54d
No related branches found
No related tags found
No related merge requests found
...@@ -156,6 +156,9 @@ abstract class sspmod_ldap_Auth_Process_BaseFilter extends SimpleSAML_Auth_Proce ...@@ -156,6 +156,9 @@ abstract class sspmod_ldap_Auth_Process_BaseFilter extends SimpleSAML_Auth_Proce
if (isset($authsource['debug'])) { if (isset($authsource['debug'])) {
$authconfig['ldap.debug'] = $authsource['debug']; $authconfig['ldap.debug'] = $authsource['debug'];
} }
if (isset($authsource['referrals'])) {
$authconfig['ldap.referrals'] = $authsource['referrals'];
}
// only set when search.enabled = true // only set when search.enabled = true
if (isset($authsource['search.enable']) && $authsource['search.enable']) { if (isset($authsource['search.enable']) && $authsource['search.enable']) {
if (isset($authsource['search.base'])) { if (isset($authsource['search.base'])) {
...@@ -262,6 +265,7 @@ abstract class sspmod_ldap_Auth_Process_BaseFilter extends SimpleSAML_Auth_Proce ...@@ -262,6 +265,7 @@ abstract class sspmod_ldap_Auth_Process_BaseFilter extends SimpleSAML_Auth_Proce
$port = $this->config->getInteger('ldap.port', 389); $port = $this->config->getInteger('ldap.port', 389);
$enable_tls = $this->config->getBoolean('ldap.enable_tls', false); $enable_tls = $this->config->getBoolean('ldap.enable_tls', false);
$debug = $this->config->getBoolean('ldap.debug', false); $debug = $this->config->getBoolean('ldap.debug', false);
$referrals = $this->config->getBoolean('ldap.referrals', true);
$timeout = $this->config->getInteger('ldap.timeout', 0); $timeout = $this->config->getInteger('ldap.timeout', 0);
$username = $this->config->getString('ldap.username', null); $username = $this->config->getString('ldap.username', null);
$password = $this->config->getString('ldap.password', null); $password = $this->config->getString('ldap.password', null);
...@@ -273,13 +277,14 @@ abstract class sspmod_ldap_Auth_Process_BaseFilter extends SimpleSAML_Auth_Proce ...@@ -273,13 +277,14 @@ abstract class sspmod_ldap_Auth_Process_BaseFilter extends SimpleSAML_Auth_Proce
' Port: ' . $port . ' Port: ' . $port .
' Enable TLS: ' . ($enable_tls ? 'Yes' : 'No') . ' Enable TLS: ' . ($enable_tls ? 'Yes' : 'No') .
' Debug: ' . ($debug ? 'Yes' : 'No') . ' Debug: ' . ($debug ? 'Yes' : 'No') .
' Referrals: ' . ($referrals ? 'Yes' : 'No') .
' Timeout: ' . $timeout . ' Timeout: ' . $timeout .
' Username: ' . $username . ' Username: ' . $username .
' Password: ' . str_repeat('*', strlen($password)) ' Password: ' . str_repeat('*', strlen($password))
); );
// Connect to the LDAP server to be queried during processing // Connect to the LDAP server to be queried during processing
$this->ldap = new SimpleSAML_Auth_LDAP($hostname, $enable_tls, $debug, $timeout, $port); $this->ldap = new SimpleSAML_Auth_LDAP($hostname, $enable_tls, $debug, $timeout, $port, $referrals);
$this->ldap->bind($username, $password); $this->ldap->bind($username, $password);
// All done // All done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment