MDL-15716 Tightened dataroot security checks and and 'loud' administrator warning

This commit is contained in:
skodak 2008-08-21 15:29:42 +00:00
parent bd2bf45169
commit bba0beaee2
9 changed files with 142 additions and 10 deletions

View file

@ -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)) {