Issue #88 - Injection should be prevented in settings even if symlinks are used.

This commit is contained in:
Daniel Thee Roperto
2016-12-14 11:06:07 +11:00
parent c809873f9a
commit 7946dccd5e
2 changed files with 4 additions and 3 deletions

View File

@@ -278,7 +278,8 @@ class outagelib_test extends advanced_testcase {
self::assertEmpty($CFG->additionalhtmltopofbody);
// Pretend we are there...
$_SERVER['SCRIPT_FILENAME'] = $CFG->dirroot.'/admin/settings.php';
$_SERVER['SCRIPT_FILENAME'] = '/var/www/alternativepath/admin/settings.php'; // Issue #88 regression test.
$_SERVER['SCRIPT_NAME'] = '/admin/settings.php';
outagelib::reinject();
self::assertEmpty($CFG->additionalhtmltopofbody);