0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

min_password_length might be integer, so do not be too strict with it

This commit is contained in:
David Goodwin 2022-09-27 19:56:28 +01:00
parent 1855513b57
commit 73106712e0

View File

@ -897,7 +897,7 @@ function validate_password($password)
$val_conf = Config::read_array('password_validation');
if (Config::has('min_password_length')) {
$minlen = (int)Config::read_string('min_password_length'); # used up to 2.3.x - check it for backward compatibility
$minlen = (int)Config::read('min_password_length'); # used up to 2.3.x - check it for backward compatibility
if ($minlen > 0) {
$val_conf['/.{' . $minlen . '}/'] = "password_too_short $minlen";
}