diff --git a/install/froxlor.sql b/install/froxlor.sql index 6bb494ca..b9e7f8fa 100644 --- a/install/froxlor.sql +++ b/install/froxlor.sql @@ -495,7 +495,6 @@ opcache.load_comments opcache.revalidate_path opcache.save_comments opcache.use_cwd -opcache.validate_timestamps opcache.fast_shutdown'), ('phpfpm', 'ini_admin_values', 'cgi.redirect_status_env date.timezone @@ -519,7 +518,8 @@ opcache.restrict_api opcache.revalidate_freq opcache.max_accelerated_files opcache.memory_consumption -opcache.interned_strings_buffer'), +opcache.interned_strings_buffer +opcache.validate_timestamps'), ('nginx', 'fastcgiparams', '/etc/nginx/fastcgi_params'), ('system', 'lastaccountnumber', '0'), ('system', 'lastguid', '9999'), 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 2351b9fb..5eb622bc 100644 --- a/install/updates/froxlor/0.10/update_0.10.inc.php +++ b/install/updates/froxlor/0.10/update_0.10.inc.php @@ -843,7 +843,7 @@ if (\Froxlor\Froxlor::isDatabaseVersion('202106270')) { throw new \Exception("img directory does not exist and cannot be created"); } if (!is_writable($path)) { - if (!chmod($path, '0775')) { + if (!chmod($path, 0775)) { throw new \Exception("Cannot write to img directory"); } } diff --git a/lib/Froxlor/Cron/MasterCron.php b/lib/Froxlor/Cron/MasterCron.php index 2f2b52a0..c280b7c4 100644 --- a/lib/Froxlor/Cron/MasterCron.php +++ b/lib/Froxlor/Cron/MasterCron.php @@ -24,6 +24,13 @@ class MasterCron extends \Froxlor\Cron\FroxlorCron private static $debugHandler = null; + private static $noncron_params = [ + 'force', + 'debug', + 'no-fork', + 'run-task' + ]; + public static function setArguments($argv = null) { self::$argv = $argv; @@ -47,6 +54,7 @@ class MasterCron extends \Froxlor\Cron\FroxlorCron echo "--run-task\t\trun a specific task [1 = re-generate configs, 4 = re-generate dns zones, 10 = re-set quotas, 99 = re-create cron.d-file]\n"; echo "--debug\t\t\toutput debug information about what is going on to STDOUT.\n"; echo "--no-fork\t\tdo not fork to backkground (traffic cron only).\n\n"; + exit(); } /** @@ -161,7 +169,7 @@ class MasterCron extends \Froxlor\Cron\FroxlorCron $crontype = ""; if (isset(self::$argv) && is_array(self::$argv) && count(self::$argv) > 1) { for ($x = 1; $x < count(self::$argv); $x ++) { - if (substr(strtolower(self::$argv[$x]), 0, 2) == '--' && strlen(self::$argv[$x]) > 3) { + if (substr(self::$argv[$x], 0, 2) == '--' && strlen(self::$argv[$x]) > 3 && !in_array(substr(strtolower(self::$argv[$x]), 2),self::$noncron_params)) { $crontype = substr(strtolower(self::$argv[$x]), 2); $basename .= "-" . $crontype; break; diff --git a/lib/Froxlor/SImExporter.php b/lib/Froxlor/SImExporter.php index 91ba149f..2f4929c8 100644 --- a/lib/Froxlor/SImExporter.php +++ b/lib/Froxlor/SImExporter.php @@ -145,13 +145,13 @@ class SImExporter // Catch image_data and save it if (isset($index_split[2]) && $index_split[2] === 'image_data' && !empty($_data[$index_split[0].'.'.$index_split[1]])) { $path = \Froxlor\Froxlor::getInstallDir().'/img/'; - if (!is_dir($path) && !mkdir($path, '0775')) { + if (!is_dir($path) && !mkdir($path, 0775)) { throw new \Exception("img directory does not exist and cannot be created"); } // Make sure we can write to the upload directory if (!is_writable($path)) { - if (!chmod($path, '0775')) { + if (!chmod($path, 0775)) { throw new \Exception("Cannot write to img directory"); } } diff --git a/lib/Froxlor/Settings/Store.php b/lib/Froxlor/Settings/Store.php index d642de1c..d19328f1 100644 --- a/lib/Froxlor/Settings/Store.php +++ b/lib/Froxlor/Settings/Store.php @@ -388,7 +388,7 @@ class Store if (!chmod($path, 0775)) { throw new \Exception("Cannot write to img directory"); } - } + } // Make sure mime-type matches an image if (!in_array(mime_content_type($_FILES[$fieldname]['tmp_name']), ['image/jpeg','image/jpg','image/png','image/gif'])) {