summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2013-06-07 12:48:07 +0200
committerAndreas Gohr <andi@splitbrain.org>2013-06-08 13:13:53 +0200
commit4a4e41d90e140973eb270bf1bd883e56f3a6b87b (patch)
tree162058bcb44bc09893f414203bcf0a305e6cfd0c /lib
parentce0343e9cc0c61966aca9328bab838ef9f35677d (diff)
downloadrpg-4a4e41d90e140973eb270bf1bd883e56f3a6b87b.tar.gz
rpg-4a4e41d90e140973eb270bf1bd883e56f3a6b87b.tar.bz2
treat empty AD credentials as NULL values FS#2781
Diffstat (limited to 'lib')
-rw-r--r--lib/plugins/authad/auth.php5
-rw-r--r--lib/plugins/authad/conf/default.php4
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php
index b6b5dd268..fcbd2eeef 100644
--- a/lib/plugins/authad/auth.php
+++ b/lib/plugins/authad/auth.php
@@ -489,6 +489,11 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
$this->cando['modPass'] = false;
}
+ // adLDAP expects empty user/pass as NULL, we're less strict FS#2781
+ if(empty($opts['admin_username'])) $opts['admin_username'] = null;
+ if(empty($opts['admin_password'])) $opts['admin_password'] = null;
+
+ // user listing needs admin priviledges
if(!empty($opts['admin_username']) && !empty($opts['admin_password'])) {
$this->cando['getUsers'] = true;
} else {
diff --git a/lib/plugins/authad/conf/default.php b/lib/plugins/authad/conf/default.php
index 9274db209..f71202cfc 100644
--- a/lib/plugins/authad/conf/default.php
+++ b/lib/plugins/authad/conf/default.php
@@ -4,8 +4,8 @@ $conf['account_suffix'] = '';
$conf['base_dn'] = '';
$conf['domain_controllers'] = '';
$conf['sso'] = 0;
-$conf['admin_username'] = '';
-$conf['admin_password'] = '';
+$conf['admin_username'] = '';
+$conf['admin_password'] = '';
$conf['real_primarygroup'] = 0;
$conf['use_ssl'] = 0;
$conf['use_tls'] = 0;