Skip to content
Snippets Groups Projects
Commit 13bfc7cd authored by mcramer's avatar mcramer
Browse files

Bugfix: Spaces need to be deleted before cron save, because they are IGNORED...

Bugfix: Spaces need to be deleted before cron save, because they are IGNORED on validation but lead to a non-functional cron.
Storing minute / hour / etc. values like "1, 23, 26" (with spaces) is allowed in validation and interface but leads to a BLOCKED crontab file and to non-functional crons of the whole web user.
parent 4b9329a0
No related branches found
No related tags found
No related merge requests found
......@@ -198,7 +198,7 @@ class cron_plugin {
if($job['run_month'] == '@reboot') {
$command = "@reboot";
} else {
$command = "{$job['run_min']}\t{$job['run_hour']}\t{$job['run_mday']}\t{$job['run_month']}\t{$job['run_wday']}";
$command = str_replace(" ", "", $job['run_min']) . "\t" . str_replace(" ", "", $job['run_hour']) . "\t" . str_replace(" ", "", $job['run_mday']) . "\t" . str_replace(" ", "", $job['run_month']) . "\t" . str_replace(" ", "", $job['run_wday']);
}
$command .= "\t{$this->parent_domain['system_user']}"; //* running as user
if($job['type'] == 'url') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment