diff --git a/actions/admin/settings/120.system.php b/actions/admin/settings/120.system.php index 1f766f8d..3d1ee0ea 100644 --- a/actions/admin/settings/120.system.php +++ b/actions/admin/settings/120.system.php @@ -27,6 +27,7 @@ return array( 'settinggroup' => 'system', 'varname' => 'documentroot_prefix', 'type' => 'string', + 'string_type' => 'dir', 'default' => '/var/customers/webs/', 'save_method' => 'storeSettingField', 'plausibility_check_method' => 'checkPathConflicts' diff --git a/actions/admin/settings/137.perl.php b/actions/admin/settings/137.perl.php index eefda5da..6769fd7e 100644 --- a/actions/admin/settings/137.perl.php +++ b/actions/admin/settings/137.perl.php @@ -43,6 +43,7 @@ return array( 'settinggroup' => 'perl', 'varname' => 'suexecpath', 'type' => 'string', + 'string_type' => 'dir', 'default' => '/var/www/cgi-bin/', 'save_method' => 'storeSettingField', 'websrv_avail' => array('apache2') diff --git a/actions/admin/settings/180.dkim.php b/actions/admin/settings/180.dkim.php index 8e937cd5..4b9d4531 100644 --- a/actions/admin/settings/180.dkim.php +++ b/actions/admin/settings/180.dkim.php @@ -36,6 +36,7 @@ return array( 'settinggroup' => 'dkim', 'varname' => 'dkim_prefix', 'type' => 'string', + 'string_type' => 'dir', 'default' => '/etc/postfix/dkim/', 'save_method' => 'storeSettingField', ), diff --git a/lib/functions/filedir/function.makeSecurePath.php b/lib/functions/filedir/function.makeSecurePath.php index 9a6b740c..2c92429f 100644 --- a/lib/functions/filedir/function.makeSecurePath.php +++ b/lib/functions/filedir/function.makeSecurePath.php @@ -38,5 +38,6 @@ function makeSecurePath($path) '' ); $path = preg_replace($search, $replace, $path); + $path = str_replace(" ", "\ ", $path); return $path; } diff --git a/lib/functions/filedir/function.storeDefaultIndex.php b/lib/functions/filedir/function.storeDefaultIndex.php index 4fc6c529..8a0368e6 100644 --- a/lib/functions/filedir/function.storeDefaultIndex.php +++ b/lib/functions/filedir/function.storeDefaultIndex.php @@ -55,6 +55,7 @@ function storeDefaultIndex($loginname = null, $destination = null, $logger = nul } else { + $destination = makeCorrectDir($destination); if ($logger !== null) { $logger->logAction(CRON_ACTION, LOG_NOTICE, 'Running: cp -a ' . $pathtophpfiles . '/templates/misc/standardcustomer/* ' . escapeshellarg($destination)); }