Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-31703 allow serving of JavaScript from unsupported '/' dirroot

  • Loading branch information...
commit 1e02608aa01fcf01f6e8611976a756b4f1d34334 1 parent 2657240
@skodak skodak authored samhemelryk committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/javascript.php
View
6 lib/javascript.php
@@ -46,7 +46,11 @@
// 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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.