MDL-17207 filter/tex reverting removal of $pathname in
http://cvs.moodle.org/moodle/filter/tex/texed.php?r1=1.8&r2=1.7 This fixes a security problem only triggered with register_globals ON and magic_quotes_gpc OFF which is a very uncommon case
This commit is contained in:
@@ -31,10 +31,12 @@
|
||||
$texexp = str_replace('<','<',$texexp);
|
||||
$texexp = str_replace('>','>',$texexp);
|
||||
$texexp = preg_replace('!\r\n?!',' ',$texexp);
|
||||
$pathname = "$CFG->dataroot/filter/tex/$image";
|
||||
$cmd = tex_filter_get_cmd($pathname, $texexp);
|
||||
system($cmd, $status);
|
||||
|
||||
if (file_exists($pathname)) {
|
||||
require_once($CFG->libdir . '/filelib.php');
|
||||
send_file($pathname, $image);
|
||||
} else {
|
||||
echo "Image not found!";
|
||||
|
||||
Reference in New Issue
Block a user