diff --git a/panel/classes/Panel.php b/panel/classes/Panel.php index ec80027..11afc45 100644 --- a/panel/classes/Panel.php +++ b/panel/classes/Panel.php @@ -113,35 +113,39 @@ class Panel { } - $character_class = 0; + if(strlen($password) < 15) { - if (preg_match('/[[:lower:]]/', $password)) { + $character_class = 0; - $character_class++; + if (preg_match('/[[:lower:]]/', $password)) { - } + $character_class++; - if (preg_match('/[[:upper:]]/', $password)) { + } - $character_class++; + if (preg_match('/[[:upper:]]/', $password)) { - } + $character_class++; - if (preg_match('/[[:digit:]]/', $password)) { + } - $character_class++; + if (preg_match('/[[:digit:]]/', $password)) { - } + $character_class++; - if (preg_match('/[[:punct:]]/', $password)) { + } - $character_class++; + if (preg_match('/[[:punct:]]/', $password)) { - } + $character_class++; - if ($character_class < 3) { + } - $messages[] = "Password must contain characters from at least three of the following four groups: Lower Case Letters, Uppler Case Leters, Numbers, Puncuation/Special Characters."; + if ($character_class < 3) { + + $messages[] = "Passwords under 15 characters must contain characters from at least three of the following four groups: Lower Case Letters, Uppler Case Leters, Numbers, Puncuation/Special Characters. Passwords 15 or more characters long do not have any complexity requirements."; + + } }