From 272da6d78134d1270292fb370a3d5420148d4b6e Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Tue, 05 May 2015 10:14:51 -0400
Subject: [PATCH] 'repeat password'-query if the default password is not used

---
 install/install.php |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/install/install.php b/install/install.php
index 6bc198d..684e1c9 100644
--- a/install/install.php
+++ b/install/install.php
@@ -454,6 +454,17 @@
 	//** Customize the port ISPConfig runs on
 	$ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port');
 	$conf['interface_password'] = $inst->free_query('Admin password', 'admin');
+	if($conf['interface_password'] != 'admin') {
+		$check = false;
+		do {
+			unset($temp_password);
+			$temp_password = $inst->free_query('Re-enter Admin password', '');
+			$check = @($temp_password == $conf['interface_password'])?true:false;
+			if(!$check) swriteln('Passwords do noz match.');
+		} while (!$check);
+	}
+	unset($check);
+	unset($temp_password);
 	if($conf['apache']['installed'] == true) $conf['apache']['vhost_port']  = $ispconfig_vhost_port;
 	if($conf['nginx']['installed'] == true) $conf['nginx']['vhost_port']  = $ispconfig_vhost_port;
 	unset($ispconfig_vhost_port);
@@ -794,6 +805,17 @@
 		//** Customise the port ISPConfig runs on
 		$ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port');
 		$conf['interface_password'] = $inst->free_query('Admin password', 'admin');
+		if($conf['interface_password'] != 'admin') {
+			$check = false;
+			do {
+				unset($temp_password);
+				$temp_password = $inst->free_query('Re-enter Admin password', '');
+				$check = @($temp_password == $conf['interface_password'])?true:false;
+				if(!$check) swriteln('Passwords do noz match.');
+			} while (!$check);
+		}
+		unset($check);
+		unset($temp_password);
 		if($conf['apache']['installed'] == true) $conf['apache']['vhost_port']  = $ispconfig_vhost_port;
 		if($conf['nginx']['installed'] == true) $conf['nginx']['vhost_port']  = $ispconfig_vhost_port;
 		unset($ispconfig_vhost_port);

--
Gitblit v1.9.1