Merge branch 'w12_MDL-31703_m23_rootdirroot' of git://github.com/skodak/moodle

This commit is contained in:
Sam Hemelryk 2012-03-19 20:16:34 +13:00
commit 2cd97ff3c5

View file

@ -46,7 +46,11 @@ foreach ($files as $fsfile) {
// does not exist
continue;
}
if (strpos($jsfile, $CFG->dirroot . DIRECTORY_SEPARATOR) !== 0) {
if ($CFG->dirroot === '/') {
// Some shared hosting sites serve files directly from '/',
// this is NOT supported, but at least allow JS when showing
// errors and warnings.
} else if (strpos($jsfile, $CFG->dirroot . DIRECTORY_SEPARATOR) !== 0) {
// hackers - not in dirroot
continue;
}