summaryrefslogtreecommitdiffstats
path: root/modules/sysconfig/addmodule_adauth.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2015-09-18 16:59:23 +0200
committerSimon Rettberg2015-09-18 16:59:23 +0200
commit05ed28bbcbe9abe242c19fc7088cfd383db52588 (patch)
tree1ff589012cc5d58a9d98957ce8486ceefd7da6f3 /modules/sysconfig/addmodule_adauth.inc.php
parentChange some wording, add deletion reminder to main page (diff)
downloadslx-admin-05ed28bbcbe9abe242c19fc7088cfd383db52588.tar.gz
slx-admin-05ed28bbcbe9abe242c19fc7088cfd383db52588.tar.xz
slx-admin-05ed28bbcbe9abe242c19fc7088cfd383db52588.zip
[ldap/ad] Figure out proper spelling of search base
Diffstat (limited to 'modules/sysconfig/addmodule_adauth.inc.php')
-rw-r--r--modules/sysconfig/addmodule_adauth.inc.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/sysconfig/addmodule_adauth.inc.php b/modules/sysconfig/addmodule_adauth.inc.php
index 1b04eab0..251ee5d6 100644
--- a/modules/sysconfig/addmodule_adauth.inc.php
+++ b/modules/sysconfig/addmodule_adauth.inc.php
@@ -80,8 +80,8 @@ class AdAuth_CheckConnection extends AddModule_Base
'edit' => Request::post('edit'),
'title' => Request::post('title'),
'server' => $this->server,
- 'searchbase' => Request::post('searchbase'),
- 'binddn' => Request::post('binddn'),
+ 'searchbase' => Util::normalizeDn(Request::post('searchbase')),
+ 'binddn' => Util::normalizeDn(Request::post('binddn')),
'bindpw' => Request::post('bindpw'),
'home' => Request::post('home'),
'ssl' => Request::post('ssl'),
@@ -206,6 +206,14 @@ class AdAuth_Finish extends AddModule_Base
if ($i === false)
$i = -1;
$searchbase = mb_substr($binddn, $i + 1);
+ } else {
+ $somedn = Request::post('somedn', false);
+ if (!empty($somedn)) {
+ $i = stripos($somedn, $searchbase);
+ if ($i !== false) {
+ $searchbase = substr($somedn, $i, strlen($searchbase));
+ }
+ }
}
$title = Request::post('title');
if (empty($title))