Skip to content

Commit

Permalink
MDL-77204 mod_wiki: Clean filename in Moodle1 backup
Browse files Browse the repository at this point in the history
  • Loading branch information
mickhawkins authored and junpataleta committed Mar 8, 2023
1 parent 5a9cc63 commit 11acdd8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mod/wiki/backup/moodle1/lib.php
Expand Up @@ -139,8 +139,9 @@ public function process_wiki($data) {
if (!empty($data['initialcontent'])) {
//convert file in <INITIALCONTENT>filename</INITIALCONTENT> into a subwiki page if no entry created.
$temppath = $this->converter->get_tempdir_path();
$this->initialcontent = file_get_contents($temppath.'/course_files/'.$data['initialcontent']);
$this->initialcontentfilename = $data['initialcontent'];
$filename = clean_param($data['initialcontent'], PARAM_FILE);
$this->initialcontent = file_get_contents($temppath . '/course_files/' . $filename);
$this->initialcontentfilename = $filename;
$this->needinitpage = true;
}
unset($data['initialcontent']);
Expand Down

0 comments on commit 11acdd8

Please sign in to comment.