Require cron job code for execution

This commit is contained in:
Matteo Gheza 2021-12-29 17:08:01 +01:00
parent 497ff73791
commit 4ce1d9e8d2
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ function cronRouter (FastRoute\RouteCollector $r) {
'/execute',
function ($vars) {
global $db, $executed_actions;
$cron_job_allowed = true;
$cron_job_allowed = get_option("cron_job_enabled", false) && ((isset($_POST['cron']) && $_POST['cron'] == "cron_job-".get_option("cron_job_code")) || (isset($_SERVER['HTTP_CRON']) && $_SERVER['HTTP_CRON'] == "cron_job-".get_option("cron_job_code")));
if(!$cron_job_allowed) {
statusCode(403);