From 4c68a5f0390e74843e2b41f9a68c0899635308bf Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 16 Aug 2017 18:20:55 +0200 Subject: [sysconfig] Add support to disable fixNumeric hack in ldadp --- modules-available/sysconfig/addmodule_adauth.inc.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'modules-available/sysconfig/addmodule_adauth.inc.php') diff --git a/modules-available/sysconfig/addmodule_adauth.inc.php b/modules-available/sysconfig/addmodule_adauth.inc.php index 5de834d9..6e4463ae 100644 --- a/modules-available/sysconfig/addmodule_adauth.inc.php +++ b/modules-available/sysconfig/addmodule_adauth.inc.php @@ -13,13 +13,16 @@ class AdAuth_Start extends AddModule_Base protected function renderInternal() { - $ADAUTH_COMMON_FIELDS = array('title', 'server', 'searchbase', 'binddn', 'bindpw', 'home', 'homeattr', 'ssl', 'certificate'); + $ADAUTH_COMMON_FIELDS = array('title', 'server', 'searchbase', 'binddn', 'bindpw', 'home', 'homeattr', 'ssl', 'fixnumeric', 'certificate'); $data = array(); if ($this->edit !== false) { moduleToArray($this->edit, $data, $ADAUTH_COMMON_FIELDS); $data['title'] = $this->edit->title(); $data['edit'] = $this->edit->id(); } + if ($data['fixnumeric'] === false) { + $data['fixnumeric'] = 's'; + } postToArray($data, $ADAUTH_COMMON_FIELDS, true); $obdn = Request::post('originalbinddn'); if (!empty($obdn)) { @@ -92,6 +95,7 @@ class AdAuth_CheckConnection extends AddModule_Base 'home' => Request::post('home'), 'homeattr' => Request::post('homeattr'), 'ssl' => Request::post('ssl'), + 'fixnumeric' => Request::post('fixnumeric'), 'certificate' => Request::post('certificate', ''), 'taskid' => $this->scanTask['id'] ); @@ -190,6 +194,7 @@ class AdAuth_SelfSearch extends AddModule_Base 'home' => Request::post('home'), 'homeattr' => Request::post('homeattr'), 'ssl' => Request::post('ssl') === 'on', + 'fixnumeric' => Request::post('fixnumeric'), 'fingerprint' => Request::post('fingerprint'), 'certificate' => Request::post('certificate', ''), 'originalbinddn' => $this->originalBindDn, @@ -265,6 +270,7 @@ class AdAuth_HomeAttrCheck extends AddModule_Base 'home' => Request::post('home'), 'homeattr' => Request::post('homeattr'), 'ssl' => Request::post('ssl') === 'on', + 'fixnumeric' => Request::post('fixnumeric'), 'fingerprint' => Request::post('fingerprint'), 'certificate' => Request::post('certificate', ''), 'originalbinddn' => Request::post('originalbinddn'), @@ -335,6 +341,7 @@ class AdAuth_CheckCredentials extends AddModule_Base 'home' => Request::post('home'), 'homeattr' => Request::post('homeattr'), 'ssl' => Request::post('ssl') === 'on', + 'fixnumeric' => Request::post('fixnumeric'), 'fingerprint' => Request::post('fingerprint'), 'certificate' => Request::post('certificate', ''), 'originalbinddn' => Request::post('originalbinddn'), @@ -397,6 +404,7 @@ class AdAuth_HomeDir extends AddModule_Base 'home' => Request::post('home'), 'homeattr' => Request::post('homeattr'), 'ssl' => Request::post('ssl') === 'on', + 'fixnumeric' => Request::post('fixnumeric'), 'fingerprint' => Request::post('fingerprint'), 'certificate' => Request::post('certificate', ''), 'originalbinddn' => Request::post('originalbinddn'), @@ -458,6 +466,7 @@ class AdAuth_Finish extends AddModule_Base $module->setData('homeattr', Request::post('homeattr')); $module->setData('certificate', Request::post('certificate')); $module->setData('ssl', $ssl); + $module->setData('fixnumeric', Request::post('fixnumeric', '', 'string')); foreach (AdAuth_HomeDir::getAttributes() as $key) { $value = Request::post($key); if (is_numeric($value)) { -- cgit v1.2.3-55-g7522