diff --git a/system/libs/validator.php b/system/libs/validator.php index 66ac3cc4..421d5fe6 100644 --- a/system/libs/validator.php +++ b/system/libs/validator.php @@ -147,18 +147,8 @@ class Validator return false; } - if (strlen($password) < 8 || strlen($password) > 30) { - self::$lastError = 'The password must have at least 8 and maximum 30 letters!'; - return false; - } - - if(strspn($password, "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890") != strlen($password)) { - self::$lastError = 'Password contains illegal letters (a-z, A-Z and 0-9 only!).'; - return false; - } - - if(!ctype_alnum($password)) { - self::$lastError = 'Password contains illegal letters (a-z, A-Z and 0-9 only!).'; + if (strlen($password) < 8 || strlen($password) > 29) { + self::$lastError = 'The password must have at least 8 and maximum 29 letters!'; return false; } @@ -168,7 +158,7 @@ class Validator } if(!preg_match('/[0-9]/', $password)) { - self::$lastError = 'The password must contain at least one letter other than A-Z or a-z!'; + self::$lastError = 'The password must contain at least one number!'; return false; } diff --git a/system/templates/account.create.html.twig b/system/templates/account.create.html.twig index a52119b7..8d9d57f9 100644 --- a/system/templates/account.create.html.twig +++ b/system/templates/account.create.html.twig @@ -86,7 +86,7 @@ Password: