MDL-35168 fix yui combo path disclosure

This commit is contained in:
Petr Škoda 2012-09-01 12:35:31 +02:00
parent 569f1ad63b
commit a2bdf34017

View File

@ -115,7 +115,8 @@ foreach ($parts as $part) {
$contentfile = "$CFG->libdir/yuilib/$part";
}
if (!file_exists($contentfile) or !is_file($contentfile)) {
$content .= "\n// Combo resource $part ($contentfile) not found!\n";
$location = '$CFG->dirroot'.preg_replace('/^'.preg_quote($CFG->dirroot, '/').'/', '', $contentfile);
$content .= "\n// Combo resource $part ($location) not found!\n";
continue;
}
$filecontent = file_get_contents($contentfile);