Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions aborttest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

require(__DIR__ . '/../../../config.php');
require_login();
require_capability('moodle/site:config', \core\context\system::instance());

$stage = optional_param('stage', 1, PARAM_NUMBER);
$ignoreabort = optional_param('ignoreabort', 0, PARAM_NUMBER);
Expand All @@ -35,6 +36,11 @@
$reload = optional_param('reload', 1, PARAM_NUMBER);
$updates = optional_param('updates', 100, PARAM_NUMBER);

// Cap values to avoid potential "accidental" DDOS.
$usleep = min($usleep, 200000); // Max of 2 seconds between progress ticks.
$reload = min($reload, 60); // Max of 1 min to reload the page.
$updates = min($updates, 100); // Max of 100 ticks.

if ($ignoreabort) {
ignore_user_abort(true);
// Worst case it should die in 5 (default) seconds.
Expand Down
3 changes: 2 additions & 1 deletion adminloginchecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
// If run from the web.
require_once(__DIR__ . '/../../../config.php');
require_once(__DIR__ . '/nagios.php');
tool_heartbeat\lib::validate_ip_against_config();
require_login();
require_capability('moodle/site:config', \core\context\system::instance());

$options['critthresh'] = optional_param('critthresh', $options['critthresh'], PARAM_INT);
$options['warnthresh'] = optional_param('warnthresh', $options['warnthresh'], PARAM_INT);
Expand Down
4 changes: 3 additions & 1 deletion upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
// @codingStandardsIgnoreStart
require(__DIR__ . '/../../../config.php');
// @codingStandardsIgnoreEnd
tool_heartbeat\lib::validate_ip_against_config();

require_login();
require_capability('moodle/site:config', \core\context\system::instance());

// @codingStandardsIgnoreStart
// Ignore Statement to skip codechecker needing require config.php first.
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2025121606;
$plugin->version = 2025121607;
$plugin->release = 2025121606; // Match release exactly to version.
$plugin->requires = 2020061500; // Support for 3.9 and above, due to the Check API.
$plugin->supported = [39, 405];
Expand Down
Loading