mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-06-19 05:38:19 +02:00
Fixed problem with bootstrap in CLI. Fixed file.php when dataroot had trailing slashes.
This commit is contained in:
@@ -64,7 +64,8 @@ function auth_outage_bootstrap_callback() {
|
||||
|
||||
// We are not using any external libraries or references in this file (cli maintenance is active).
|
||||
// If you change the path below maybe you need to change maintenance_static_page::get_resources_folder() as well.
|
||||
$resourcedir = $CFG->dataroot.'/auth_outage/climaintenance';
|
||||
$resourcedir = rtrim($CFG->dataroot, '/'); // In case the configuration has a trailing slash.
|
||||
$resourcedir = $resourcedir.'/auth_outage/climaintenance';
|
||||
|
||||
// Protect against path traversal attacks.
|
||||
$file = $resourcedir.'/'.$_GET['file'];
|
||||
|
||||
Reference in New Issue
Block a user