MDL-47287 prevent web access to phpunit boostrap
authorPetr Skoda <petr.skoda@totaralms.com>
Thu, 18 Sep 2014 02:29:21 +0000 (14:29 +1200)
committerMarina Glancy <marina@moodle.com>
Mon, 3 Nov 2014 09:10:33 +0000 (17:10 +0800)
lib/phpunit/bootstrap.php

index 9aae348..4d573df 100644 (file)
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+if (isset($_SERVER['REMOTE_ADDR'])) {
+    die; // No access from web!
+}
+
 // we want to know about all problems
 error_reporting(E_ALL | E_STRICT);
 ini_set('display_errors', '1');