MDL-22812 Do not change dataroot path passed as argument

Because PARAM_SAFEPATH was applied on dataroot argument, directories
containing dots (eg. /var/www/data/moodle.tld.com) were silently
renamed. The patch removes the input validation on the argument. If the
enemy is executing scripts at the server, you are doomed anyway.
This commit is contained in:
David Mudrak
2010-06-17 15:40:07 +00:00
parent 68949e5d5f
commit c31aa73c70
+1 -1
View File
@@ -311,7 +311,7 @@ $CFG->httpswwwroot = $CFG->wwwroot;
//We need dataroot before lang download
if (!empty($options['dataroot'])) {
$CFG->dataroot = clean_param($options['dataroot'], PARAM_SAFEPATH);
$CFG->dataroot = $options['dataroot'];
}
if ($interactive) {
cli_separator();