mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-72029 Lesson: Prevent arbitrary file read when importing lesson questions in blackboard format
This commit is contained in:
parent
d585f902fc
commit
3cafb305de
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user