Fix #yogosha4533

This commit is contained in:
Laurent Destailleur 2020-09-18 23:26:05 +02:00
parent 4710fedda6
commit 4f2d3176f5
2 changed files with 10 additions and 0 deletions

View File

@ -1008,6 +1008,15 @@ class Cronjob extends CommonObject
$retval = $this->lastresult;
$error++;
}
if (in_array(strtolower(trim($this->methodename)), array('executecli')))
{
$this->error = $langs->trans('CronMethodNotAllowed', $this->methodename, $this->objectname);
dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR);
$this->lastoutput = $this->error;
$this->lastresult = -1;
$retval = $this->lastresult;
$error++;
}
}
// Load langs

View File

@ -14,6 +14,7 @@ FileToLaunchCronJobs=Command line to check and launch qualified cron jobs
CronExplainHowToRunUnix=On Unix environment you should use the following crontab entry to run the command line each 5 minutes
CronExplainHowToRunWin=On Microsoft(tm) Windows environment you can use Scheduled Task tools to run the command line each 5 minutes
CronMethodDoesNotExists=Class %s does not contains any method %s
CronMethodNotAllowed=Method %s of class %s is in blacklist of forbidden methods
CronJobDefDesc=Cron job profiles are defined into the module descriptor file. When module is activated, they are loaded and available so you can administer the jobs from the admin tools menu %s.
CronJobProfiles=List of predefined cron job profiles
# Menu