Commit 126cabdb authored by Richard Mansfield's avatar Richard Mansfield

Don't refuse to serve files from inside dataroot when dataroot has a symlink...

Don't refuse to serve files from inside dataroot when dataroot has a symlink in it (Eduforge tracker, #3324)
Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent e2163264
......@@ -51,7 +51,7 @@ define('BYTESERVING_BOUNDARY', 'm1i2k3e40516'); //unique string constant
* there are none.
*/
function serve_file($path, $filename, $mimetype, $options=array()) {
$dataroot = get_config('dataroot');
$dataroot = realpath(get_config('dataroot'));
$path = realpath($path);
$options = array_merge(array(
'lifetime' => 86400
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment