mcramer
2012-06-08 13bfc7cd321fad7e20cd2f49ddaaa0eb01527896
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.

1 files modified
2 ■■■ changed files
server/plugins-available/cron_plugin.inc.php 2 ●●● patch | view | raw | blame | history
server/plugins-available/cron_plugin.inc.php
@@ -198,7 +198,7 @@
                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') {