Fix change empty password with accept weak passwords. (#141)

This commit is contained in:
huzvar 2022-03-03 14:39:42 +01:00 committed by GitHub
parent 7af47448a9
commit 9c1a5d0faf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,7 @@ set_page_access("user");
if (isset($_POST['change_password'])) {
if (!$_POST['password']) { $not_strong_enough = 1; }
if ((!is_numeric($_POST['pass_score']) or $_POST['pass_score'] < 3) and $ACCEPT_WEAK_PASSWORDS != TRUE) { $not_strong_enough = 1; }
if (preg_match("/\"|'/",$_POST['password'])) { $invalid_chars = 1; }
if ($_POST['password'] != $_POST['password_match']) { $mismatched = 1; }