From 0baf9763636aa4158a45ef2b539d2df0aa0bbd53 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Thu, 18 Sep 2014 14:29:21 +1200 Subject: [PATCH] MDL-47287 prevent web access to phpunit boostrap --- lib/phpunit/bootstrap.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/phpunit/bootstrap.php b/lib/phpunit/bootstrap.php index 749bcfa8b73..c7684dcc81d 100644 --- a/lib/phpunit/bootstrap.php +++ b/lib/phpunit/bootstrap.php @@ -26,6 +26,10 @@ * @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');