mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-15716 Tightened dataroot security checks and and 'loud' administrator warning
This commit is contained in:
parent
bd2bf45169
commit
bba0beaee2
9 changed files with 142 additions and 10 deletions
|
@ -272,8 +272,12 @@ if ($INSTALL['stage'] == DIRECTORY) {
|
|||
|
||||
/// check dataroot
|
||||
$CFG->dataroot = $INSTALL['dataroot'];
|
||||
$CFG->wwwroot = $INSTALL['wwwroot'];
|
||||
if (make_upload_directory('sessions', false) === false) {
|
||||
$errormsg .= get_string('datarooterror', 'install').'<br />';
|
||||
|
||||
} else if (is_dataroot_insecure(true) == INSECURE_DATAROOT_ERROR) {
|
||||
$errormsg .= get_string('datarootpublicerror', 'install').'<br />';
|
||||
}
|
||||
|
||||
if (!empty($errormsg)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue