Skip to content

Commit b2f827b

Browse files
author
Marius Cramer
committed
Merge branch 'master' into 'master'
'repeat password'-query if the default password is not used See merge request !183
2 parents 1013103 + 480ebab commit b2f827b

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

install/install.php

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,17 @@
454454
//** Customize the port ISPConfig runs on
455455
$ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port');
456456
$conf['interface_password'] = $inst->free_query('Admin password', 'admin');
457+
if($conf['interface_password'] != 'admin') {
458+
$check = false;
459+
do {
460+
unset($temp_password);
461+
$temp_password = $inst->free_query('Re-enter admin password', '');
462+
$check = @($temp_password == $conf['interface_password'])?true:false;
463+
if(!$check) swriteln('Passwords do not match.');
464+
} while (!$check);
465+
}
466+
unset($check);
467+
unset($temp_password);
457468
if($conf['apache']['installed'] == true) $conf['apache']['vhost_port'] = $ispconfig_vhost_port;
458469
if($conf['nginx']['installed'] == true) $conf['nginx']['vhost_port'] = $ispconfig_vhost_port;
459470
unset($ispconfig_vhost_port);
@@ -794,6 +805,17 @@
794805
//** Customise the port ISPConfig runs on
795806
$ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port');
796807
$conf['interface_password'] = $inst->free_query('Admin password', 'admin');
808+
if($conf['interface_password'] != 'admin') {
809+
$check = false;
810+
do {
811+
unset($temp_password);
812+
$temp_password = $inst->free_query('Re-enter admin password', '');
813+
$check = @($temp_password == $conf['interface_password'])?true:false;
814+
if(!$check) swriteln('Passwords do not match.');
815+
} while (!$check);
816+
}
817+
unset($check);
818+
unset($temp_password);
797819
if($conf['apache']['installed'] == true) $conf['apache']['vhost_port'] = $ispconfig_vhost_port;
798820
if($conf['nginx']['installed'] == true) $conf['nginx']['vhost_port'] = $ispconfig_vhost_port;
799821
unset($ispconfig_vhost_port);
@@ -839,4 +861,4 @@
839861
echo "Installation completed.\n";
840862

841863

842-
?>
864+
?>

0 commit comments

Comments
 (0)