MDL-72029 Lesson: Prevent arbitrary file read when importing lesson questions in blackboard format
This commit is contained in:
@@ -152,7 +152,8 @@ class qformat_blackboard_six extends qformat_blackboard_six_base {
|
||||
}
|
||||
if ($examfile->getAttribute('type') == 'assessment/x-bb-pool') {
|
||||
if ($examfile->getAttribute('baseurl')) {
|
||||
$fileobj->filebase = $this->tempdir. '/' . $examfile->getAttribute('baseurl');
|
||||
$fileobj->filebase = clean_param($this->tempdir . '/'
|
||||
. $examfile->getAttribute('baseurl'), PARAM_SAFEPATH);
|
||||
}
|
||||
if ($content = $this->get_filecontent($examfile->getAttribute('file'))) {
|
||||
$fileobj->filetype = self::FILETYPE_POOL;
|
||||
|
||||
Reference in New Issue
Block a user