Skip to content

Commit

Permalink
Merge pull request #1551 from allandanton/master
Browse files Browse the repository at this point in the history
Destroy Sessions for cronjobs
  • Loading branch information
Lea9250 authored Sep 4, 2023
2 parents 5042305 + a19803d commit a60be7f
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 8 deletions.
4 changes: 3 additions & 1 deletion crontab/cron_all_software.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@

print("[".date("Y-m-d H:i:s"). "] Start to process software by pool of ".$chunk."\n");
$insert = $software->software_link_treatment($chunk);
print("[".date("Y-m-d H:i:s"). "] End of process\n");
print("[".date("Y-m-d H:i:s"). "] End of process\n");

session_destroy();
4 changes: 3 additions & 1 deletion crontab/cron_clean_orphan.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@
}
}

print("[".date("Y-m-d H:i:s"). "] End of process\n");
print("[".date("Y-m-d H:i:s"). "] End of process\n");

session_destroy();
5 changes: 4 additions & 1 deletion crontab/cron_cve.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@
} else {
$cve->verbose($cve->CVE_VERBOSE, 3);
exit();
}?>
}

session_destroy();
?>
2 changes: 2 additions & 0 deletions crontab/cron_cve_computer.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,6 @@
$cve->verbose($cve->CVE_VERBOSE, 3);
exit();
}

session_destroy();
?>
4 changes: 3 additions & 1 deletion crontab/cron_ipdiscover.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@
mysql2_query_secure($purgeQuery, $_SESSION['OCS']["writeServer"], $purgeDate);

print("[".date("Y-m-d H:i:s"). "] ".$resultCount->num_rows." devices have been removed\n");
}
}

session_destroy();
2 changes: 2 additions & 0 deletions crontab/cron_purge_history.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@
mysql2_query_secure($reqDelHistory, $_SESSION['OCS']["writeServer"]);

print("[".date("Y-m-d H:i:s"). "] Download history has been purged of removed packages\n");

session_destroy();
?>
5 changes: 1 addition & 4 deletions crontab/cron_report_notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,4 @@
$sendNotifs = $groupReport->sendReportNotification($scheduled, $values, $groupReport);
}





session_destroy();
1 change: 1 addition & 0 deletions crontab/cron_wol.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@
}
}

session_destroy();

0 comments on commit a60be7f

Please sign in to comment.