mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-17 05:48:43 +02:00
Compare commits
2 Commits
1.0.10
...
master-fai
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f1cfcb908 | ||
|
|
dec4c7bf53 |
@@ -246,7 +246,7 @@ class outagelib {
|
||||
}
|
||||
// I know Moodle validation would clean up this field, but just in case, let's ensure no
|
||||
// single-quotes (and double for the sake of it) are present otherwise it would break the code.
|
||||
$allowedips = str_replace('\'"', '', $allowedips);
|
||||
$allowedips = addslashes($allowedips);
|
||||
|
||||
$code = <<<'EOT'
|
||||
<?php
|
||||
|
||||
@@ -289,7 +289,7 @@ class outagelib_test extends advanced_testcase {
|
||||
if ((time() >= 123) && (time() < 456)) {
|
||||
define('MOODLE_INTERNAL', true);
|
||||
require_once($CFG->dirroot.'/lib/moodlelib.php');
|
||||
if (!remoteip_in_list('heyyou
|
||||
if (!remoteip_in_list('hey\'\"you
|
||||
a.b.c.d
|
||||
e.e.e.e/20')) {
|
||||
header($_SERVER['SERVER_PROTOCOL'] . ' 503 Moodle under maintenance');
|
||||
|
||||
Reference in New Issue
Block a user