summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <gohr@cosmocode.de>2015-02-09 09:40:24 +0100
committerAndreas Gohr <gohr@cosmocode.de>2015-02-09 09:40:24 +0100
commitd75d76b237162cf89dcc8f56703ec0607ed27fdb (patch)
tree26a780b2e33959bea0d5b7bea87a7f1c3074e558
parent4c32d8dc4120e5a2667564b4108b3708986ea47e (diff)
downloadrpg-d75d76b237162cf89dcc8f56703ec0607ed27fdb.tar.gz
rpg-d75d76b237162cf89dcc8f56703ec0607ed27fdb.tar.bz2
fix referral settings in AuthLDAP. closes #1023
-rw-r--r--lib/plugins/authldap/auth.php4
-rw-r--r--lib/plugins/authldap/conf/default.php2
-rw-r--r--lib/plugins/authldap/conf/metadata.php2
-rw-r--r--lib/plugins/authldap/lang/en/settings.php4
4 files changed, 8 insertions, 4 deletions
diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php
index fd4729331..50735882f 100644
--- a/lib/plugins/authldap/auth.php
+++ b/lib/plugins/authldap/auth.php
@@ -516,13 +516,13 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
}
}
// needs version 3
- if($this->getConf('referrals')) {
+ if($this->getConf('referrals') > -1) {
if(!@ldap_set_option(
$this->con, LDAP_OPT_REFERRALS,
$this->getConf('referrals')
)
) {
- msg('Setting LDAP referrals to off failed', -1);
+ msg('Setting LDAP referrals failed', -1);
$this->_debug('LDAP referal set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
}
}
diff --git a/lib/plugins/authldap/conf/default.php b/lib/plugins/authldap/conf/default.php
index 2c295eeeb..c2e462c5c 100644
--- a/lib/plugins/authldap/conf/default.php
+++ b/lib/plugins/authldap/conf/default.php
@@ -8,7 +8,7 @@ $conf['userfilter'] = '';
$conf['groupfilter'] = '';
$conf['version'] = 2;
$conf['starttls'] = 0;
-$conf['referrals'] = 0;
+$conf['referrals'] = -1;
$conf['deref'] = 0;
$conf['binddn'] = '';
$conf['bindpw'] = '';
diff --git a/lib/plugins/authldap/conf/metadata.php b/lib/plugins/authldap/conf/metadata.php
index 6aa53c40d..4649ba5bf 100644
--- a/lib/plugins/authldap/conf/metadata.php
+++ b/lib/plugins/authldap/conf/metadata.php
@@ -7,7 +7,7 @@ $meta['userfilter'] = array('string','_caution' => 'danger');
$meta['groupfilter'] = array('string','_caution' => 'danger');
$meta['version'] = array('numeric','_caution' => 'danger');
$meta['starttls'] = array('onoff','_caution' => 'danger');
-$meta['referrals'] = array('onoff','_caution' => 'danger');
+$meta['referrals'] = array('multichoice','_choices' => array(-1,0,1),'_caution' => 'danger');
$meta['deref'] = array('multichoice','_choices' => array(0,1,2,3),'_caution' => 'danger');
$meta['binddn'] = array('string','_caution' => 'danger');
$meta['bindpw'] = array('password','_caution' => 'danger');
diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php
index b73166ab2..951901ccc 100644
--- a/lib/plugins/authldap/lang/en/settings.php
+++ b/lib/plugins/authldap/lang/en/settings.php
@@ -21,3 +21,7 @@ $lang['deref_o_0'] = 'LDAP_DEREF_NEVER';
$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING';
$lang['deref_o_2'] = 'LDAP_DEREF_FINDING';
$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS';
+
+$lang['referrals_o_-1'] = 'use default';
+$lang['referrals_o_0'] = 'don\'t follow referrals';
+$lang['referrals_o_1'] = 'follow referrals'; \ No newline at end of file