mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 09:53:20 +01:00
SF #412969 - Added a some error checking to see if the users enter the admin passwords. Which was casuing people to not be able to login
This commit is contained in:
parent
4721a92a48
commit
3847c94a20
@ -3,6 +3,27 @@
|
|||||||
include("./inc/functions.inc.php");
|
include("./inc/functions.inc.php");
|
||||||
include("../version.inc.php");
|
include("../version.inc.php");
|
||||||
|
|
||||||
|
function check_form_values()
|
||||||
|
{
|
||||||
|
global $setting, $phpgw_setup;
|
||||||
|
|
||||||
|
if (! $setting['config_pass'])
|
||||||
|
{
|
||||||
|
$errors .= "<br>You didn't enter a config password";
|
||||||
|
}
|
||||||
|
if (! $setting['HEADER_ADMIN_PASSWORD'])
|
||||||
|
{
|
||||||
|
$errors .= "<br>You didn't enter a header admin password";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($errors)
|
||||||
|
{
|
||||||
|
$phpgw_setup->show_header("Error",True);
|
||||||
|
echo $errors;
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* authentication phase */
|
/* authentication phase */
|
||||||
$phpgw_info["setup"]["stage"]["header"] = $phpgw_setup->check_header();
|
$phpgw_info["setup"]["stage"]["header"] = $phpgw_setup->check_header();
|
||||||
switch($phpgw_info["setup"]["stage"]["header"]){
|
switch($phpgw_info["setup"]["stage"]["header"]){
|
||||||
@ -37,6 +58,7 @@
|
|||||||
|
|
||||||
switch($action){
|
switch($action){
|
||||||
case "download":
|
case "download":
|
||||||
|
check_form_values();
|
||||||
include("./inc/phpgw_template.inc.php");
|
include("./inc/phpgw_template.inc.php");
|
||||||
$header_template = new Template("../");
|
$header_template = new Template("../");
|
||||||
header("Content-disposition: attachment; filename=\"header.inc.php\"");
|
header("Content-disposition: attachment; filename=\"header.inc.php\"");
|
||||||
@ -47,6 +69,7 @@
|
|||||||
echo $newheader;
|
echo $newheader;
|
||||||
break;
|
break;
|
||||||
case "view":
|
case "view":
|
||||||
|
check_form_values();
|
||||||
include("./inc/phpgw_template.inc.php");
|
include("./inc/phpgw_template.inc.php");
|
||||||
$header_template = new Template("../");
|
$header_template = new Template("../");
|
||||||
$phpgw_setup->show_header("Generated header.inc.php", False, "header");
|
$phpgw_setup->show_header("Generated header.inc.php", False, "header");
|
||||||
@ -63,6 +86,7 @@
|
|||||||
echo "</body></html>";
|
echo "</body></html>";
|
||||||
break;
|
break;
|
||||||
case "write config":
|
case "write config":
|
||||||
|
check_form_values();
|
||||||
include("./inc/phpgw_template.inc.php");
|
include("./inc/phpgw_template.inc.php");
|
||||||
$header_template = new Template("../");
|
$header_template = new Template("../");
|
||||||
if(is_writeable ("../header.inc.php")|| (!file_exists ("../header.inc.php") && is_writeable ("../"))){
|
if(is_writeable ("../header.inc.php")|| (!file_exists ("../header.inc.php") && is_writeable ("../"))){
|
||||||
|
Loading…
Reference in New Issue
Block a user