Skip to content

Commit 2c49c56

Browse files
author
Till Brehm
committed
Fixed issue in password strength check.
1 parent 0cba4ef commit 2c49c56

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

interface/lib/classes/validate_password.inc.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ private function _get_password_strength($password) {
5353
$different += 1;
5454
}
5555

56-
if (preg_match('/[`~!@#$%^&*()_+|\\=-[]}{\';:\/?.>,<" ]/', $password)) {
56+
if (preg_match('/[`~!@#$%^&*()_+|\\=-\[\]}{\';:\/?.>,<" ]/', $password)) {
5757
$points += 1;
5858
$different += 1;
5959
}
60+
6061

6162
if ($points == 0 || $different < 3) {
6263
if ($length >= 5 && $length <= 6) {
@@ -122,7 +123,7 @@ function password_check($field_name, $field_value, $validator) {
122123
$lng_text = str_replace('{chars}', $min_password_length, $lng_text);
123124
}
124125
if(!$lng_text) $lng_text = 'weak_password_txt'; // always return a string, even if language is missing - otherwise validator is NOT MATCHING!
125-
126+
126127
if(strlen($field_value) < $min_password_length) return $lng_text;
127128
if($this->_get_password_strength($field_value) < $min_password_strength) return $lng_text;
128129

0 commit comments

Comments
 (0)