From acb3d4799d2993ddd1600ffab0d524846afb629c Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Wed, 22 Apr 2009 11:31:53 +0000 Subject: [PATCH] login.php, index.php: - removed the $CONF['configured'] = 'I_know_the_risk_of_not_deleting_setup.php' developer hack (no longer needed since setup.php requires a password) - this also makes index.php redirecting to login.php again (the old check tested for file_exists(setup.php)...) common.php: - removed a superfluous check for $CONF[setup_password] (see mailinglist for details) config.inc.php: - removed a small outdated comment git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@640 a1433add-5e2c-0410-b055-b7f2511e0802 --- common.php | 3 --- config.inc.php | 2 +- index.php | 2 +- login.php | 11 +++-------- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/common.php b/common.php index c548980d..c8938d75 100644 --- a/common.php +++ b/common.php @@ -40,9 +40,6 @@ if(isset($CONF['configured'])) { if($CONF['configured'] == FALSE) { die("Please edit config.inc.php - change \$CONF['configured'] to true after setting your database settings"); } - if(!isset($CONF['setup_password'])) { - die("You must have a \$CONF['setup_password'] defined - this allows authenticated access to setup.php"); - } } diff --git a/config.inc.php b/config.inc.php index 8699ebb9..2bbca1e1 100644 --- a/config.inc.php +++ b/config.inc.php @@ -382,7 +382,7 @@ $CONF['theme_css'] = 'css/default.css'; // that future updates work without problems, you can use a separate config // file (config.local.php) instead of editing this file and override some // settings there. -if (file_exists(dirname(__FILE__) . '/config.local.php')) { # for / +if (file_exists(dirname(__FILE__) . '/config.local.php')) { include(dirname(__FILE__) . '/config.local.php'); } diff --git a/index.php b/index.php index 21939023..7bcd2bc9 100644 --- a/index.php +++ b/index.php @@ -23,7 +23,7 @@ $CONF['configured'] = FALSE; @include_once('config.inc.php'); # hide error message because only $CONF['configured'] is checked here -if (!file_exists (realpath ("./setup.php")) || $CONF['configured'] == 'I_know_the_risk_of_not_deleting_setup.php') +if ( $CONF['configured'] === TRUE ) { header ("Location: login.php"); exit; diff --git a/login.php b/login.php index 6f453e11..925ba664 100644 --- a/login.php +++ b/login.php @@ -30,14 +30,9 @@ require_once('common.php'); -if (isset($CONF['configured']) && $CONF['configured'] == 'I_know_the_risk_of_not_deleting_setup.php') { -} -else -{ - if($CONF['configured'] !== true) { - print "Installation not yet configured; please edit config.inc.php"; - exit; - } +if($CONF['configured'] !== true) { + print "Installation not yet configured; please edit config.inc.php"; + exit; } if ($_SERVER['REQUEST_METHOD'] == "GET")