From 2c49c56ebcb55e4dec88f22bf2977d0e6db9bcc7 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 01 Aug 2014 09:58:04 -0400
Subject: [PATCH] Fixed issue in password strength check.
---
interface/lib/classes/validate_password.inc.php | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/interface/lib/classes/validate_password.inc.php b/interface/lib/classes/validate_password.inc.php
index 998c37c..da044c6 100644
--- a/interface/lib/classes/validate_password.inc.php
+++ b/interface/lib/classes/validate_password.inc.php
@@ -53,10 +53,11 @@
$different += 1;
}
- if (preg_match('/[`~!@#$%^&*()_+|\\=-[]}{\';:\/?.>,<" ]/', $password)) {
+ if (preg_match('/[`~!@#$%^&*()_+|\\=-\[\]}{\';:\/?.>,<" ]/', $password)) {
$points += 1;
$different += 1;
}
+
if ($points == 0 || $different < 3) {
if ($length >= 5 && $length <= 6) {
@@ -122,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