mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 04:33:13 +01:00
MDL-31703 allow serving of JavaScript from unsupported '/' dirroot
This commit is contained in:
parent
a2b30aa852
commit
265b1434b0
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user