From 3fa9f71fc43ebf371e14d30dac73bf4390a16287 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 18 Sep 2006 09:28:51 +0000 Subject: [PATCH] forbit to call setup-cli.php via the webserver --- setup/setup-cli.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup/setup-cli.php b/setup/setup-cli.php index cf1970f1cb..94cba70c7c 100755 --- a/setup/setup-cli.php +++ b/setup/setup-cli.php @@ -13,7 +13,11 @@ chdir(dirname(__FILE__)); // to enable our relative pathes to work -if ($_SERVER['argc'] > 1) +if (isset($_SERVER['PHP_SELF'])) // security precaution: forbit calling setup-cli as web-page +{ + die('

setup-cli.php must NOT be called as web-page --> exiting !!!

'); +} +elseif ($_SERVER['argc'] > 1) { $arguments = $_SERVER['argv']; array_shift($arguments);