diff --git a/install/updates/froxlor/0.10/update_0.10.inc.php b/install/updates/froxlor/0.10/update_0.10.inc.php index a2469065..a3a1827f 100644 --- a/install/updates/froxlor/0.10/update_0.10.inc.php +++ b/install/updates/froxlor/0.10/update_0.10.inc.php @@ -265,6 +265,7 @@ if (\Froxlor\Froxlor::isDatabaseVersion('201904100')) { } if (\Froxlor\Froxlor::isFroxlorVersion('0.10.0-rc1')) { + showUpdateStep("Updating from 0.10.0-rc1 to 0.10.0-rc2", false); \Froxlor\Froxlor::updateToVersion('0.10.0-rc2'); } @@ -302,18 +303,31 @@ if (\Froxlor\Froxlor::isDatabaseVersion('201907270')) { "templates/Sparkle/admin/tickets", "templates/Sparkle/customer/tickets" ); + $disabled = explode(',', ini_get('disable_functions')); + $exec_allowed = !in_array('exec', $disabled); + $del_list = ""; foreach ($to_clean as $filedir) { $complete_filedir = \Froxlor\Froxlor::getInstallDir() . $filedir; if (file_exists($complete_filedir)) { - Froxlor\FileDir::safe_exec("rm -rf " . escapeshellarg($complete_filedir)); + if ($exec_allowed) { + Froxlor\FileDir::safe_exec("rm -rf " . escapeshellarg($complete_filedir)); + } else { + $del_list .= "rm -rf " . escapeshellarg($complete_filedir) . PHP_EOL; + } } } - lastStepStatus(0); + if ($exec_allowed) { + lastStepStatus(0); + } else { + lastStepStatus(1, 'manual commands needed'); + echo 'Please run the following commands manually:
'.$del_list.'

'; + } \Froxlor\Froxlor::updateToDbVersion('201909150'); } if (\Froxlor\Froxlor::isFroxlorVersion('0.10.0-rc2')) { + showUpdateStep("Updating from 0.10.0-rc2 to 0.10.0 final", false); \Froxlor\Froxlor::updateToVersion('0.10.0'); } diff --git a/lib/Froxlor/Cron/Http/ConfigIO.php b/lib/Froxlor/Cron/Http/ConfigIO.php index f82159a5..55002285 100644 --- a/lib/Froxlor/Cron/Http/ConfigIO.php +++ b/lib/Froxlor/Cron/Http/ConfigIO.php @@ -191,7 +191,7 @@ class ConfigIO /** * don't do anything if the file does not exist */ - if (@file_exists($awstatsclean['fullentry'])) { + if (@file_exists($awstatsclean['fullentry']) && $awstatsclean['entry'] != '.' && $awstatsclean['entry'] != '..') { $awstatsclean['fh'] = fopen($awstatsclean['fullentry'], 'r'); $awstatsclean['headerRead'] = fgets($awstatsclean['fh'], strlen($awstatsclean['header']) + 1); fclose($awstatsclean['fh']); diff --git a/lib/Froxlor/Cron/Http/HttpConfigBase.php b/lib/Froxlor/Cron/Http/HttpConfigBase.php index c927423d..eecbfeff 100644 --- a/lib/Froxlor/Cron/Http/HttpConfigBase.php +++ b/lib/Froxlor/Cron/Http/HttpConfigBase.php @@ -133,7 +133,7 @@ class HttpConfigBase "); $ssldestport = Database::pexecute_first($ssldestport_stmt); - if ($ssldestport['port'] != '') { + if ($ssldestport && $ssldestport['port'] != '') { $_sslport = ":" . $ssldestport['port']; }