From d85994c9ebcee956c51eac8283d90b42ed94e75c Mon Sep 17 00:00:00 2001
From: CSoellinger <dev@csoellinger.at>
Date: Sun, 04 Oct 2015 09:42:07 -0400
Subject: [PATCH] Updatet ispconfig.vhost tpl inside installer with new SSL Options - SSLCipherSuite - SSLHonorCipherOrder - Header always add Strict-Transport-Security - SSLUseStapling - SSLStaplingResponderTimeout - SSLStaplingReturnResponderErrors - SSLStaplingCache

---
 interface/lib/classes/validate_password.inc.php |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/interface/lib/classes/validate_password.inc.php b/interface/lib/classes/validate_password.inc.php
index 543a90e..da044c6 100644
--- a/interface/lib/classes/validate_password.inc.php
+++ b/interface/lib/classes/validate_password.inc.php
@@ -38,19 +38,28 @@
 			return 1;
 		}
 
+		$different = 0;
+		if (preg_match('/[abcdefghijklnmopqrstuvwxyz]/', $password)) {
+			$different += 1;
+		}
+
 		if (preg_match('/[ABCDEFGHIJKLNMOPQRSTUVWXYZ]/', $password)) {
 			$points += 1;
+			$different += 1;
 		}
 
 		if (preg_match('/[0123456789]/', $password)) {
 			$points += 1;
+			$different += 1;
 		}
 
-		if (preg_match('/[`~!@#$%^&*()_+|\\=-[]}{\';:\/?.>,<" ]/', $password)) {
+		if (preg_match('/[`~!@#$%^&*()_+|\\=-\[\]}{\';:\/?.>,<" ]/', $password)) {
 			$points += 1;
+			$different += 1;
 		}
+		
 
-		if ($points == 0) {
+		if ($points == 0 || $different < 3) {
 			if ($length >= 5 && $length <= 6) {
 				return 1;
 			} else if ($length >= 7 && $length <= 8) {
@@ -114,7 +123,7 @@
 			$lng_text = str_replace('{chars}', $min_password_length, $lng_text);
 		}
 		if(!$lng_text) $lng_text = 'weak_password_txt'; // always return a string, even if language is missing - otherwise validator is NOT MATCHING!
-		
+
 		if(strlen($field_value) < $min_password_length) return $lng_text;
 		if($this->_get_password_strength($field_value) < $min_password_strength) return $lng_text;
 		

--
Gitblit v1.9.1