mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'MDL-48929-master' of git://github.com/FMCorz/moodle
This commit is contained in:
commit
48bac91be8
1 changed files with 2 additions and 2 deletions
|
@ -575,7 +575,7 @@ class repository_filesystem extends repository {
|
|||
$fullrelativefilepath = realpath($this->get_rootpath().$basepath.$relativepath);
|
||||
|
||||
// Sanity check to make sure this path is inside this repository and the file exists.
|
||||
if (strpos($fullrelativefilepath, $this->get_rootpath()) === 0 && file_exists($fullrelativefilepath)) {
|
||||
if (strpos($fullrelativefilepath, realpath($this->get_rootpath())) === 0 && file_exists($fullrelativefilepath)) {
|
||||
send_file($fullrelativefilepath, basename($relativepath), null, 0);
|
||||
}
|
||||
}
|
||||
|
@ -665,4 +665,4 @@ function repository_filesystem_cron() {
|
|||
$instances[$itemid]->remove_obsolete_thumbnails($files);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue