From: hickert Date: Fri, 20 Apr 2007 06:54:56 +0000 (+0000) Subject: Skip redirect to login, if configuration file permissions are wrong X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f909d6c6ac921d2853766ad91b52debae498674c;p=gosa.git Skip redirect to login, if configuration file permissions are wrong git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6149 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/setup/class_setupStep_Finish.inc b/setup/class_setupStep_Finish.inc index 579ce6226..8e23e4437 100644 --- a/setup/class_setupStep_Finish.inc +++ b/setup/class_setupStep_Finish.inc @@ -60,8 +60,11 @@ class Step_Finish extends setup_step */ $exists = file_exists(CONFIG_DIR."/".CONFIG_FILE); - /* Redirect to GOsa login */ - if(isset($_POST['next']) && $exists){ + /* Redirect to GOsa login, if : + * - gosa.conf exists + * - Permisssion are set correctly + */ + if(isset($_POST['next']) && $exists && !is_world_readable(CONFIG_DIR."/".CONFIG_FILE)){ session_destroy(); header("Location: index.php"); exit(); @@ -95,6 +98,8 @@ class Step_Finish extends setup_step if($exists && $this->is_world_readable(CONFIG_DIR."/".CONFIG_FILE)){ $err_msg = _("Your configuration file is currently world readable. This is a big security risk. Please updated the file permissions!"); + }elseif(!$exists){ + $err_msg = _("The configuration is currently not readable or it does not exists."); } $smarty = get_smarty();