mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 19:06:41 +02:00
Merge branch 'm26_MDL-43192' of https://github.com/danmarsden/moodle into MOODLE_26_STABLE
This commit is contained in:
commit
c4bc562172
1 changed files with 2 additions and 2 deletions
|
@ -572,10 +572,10 @@ class repository_filesystem extends repository {
|
|||
$filename = $mainfile->get_filename();
|
||||
$basepath = strstr($mainfilepath, $filename, true);
|
||||
|
||||
$fullrelativefilepath = realpath($this->root_path.$basepath.$relativepath);
|
||||
$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->root_path) === 0 && file_exists($fullrelativefilepath)) {
|
||||
if (strpos($fullrelativefilepath, $this->get_rootpath()) === 0 && file_exists($fullrelativefilepath)) {
|
||||
send_file($fullrelativefilepath, basename($relativepath), null, 0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue