Skip to content
Permalink
Browse files Browse the repository at this point in the history
fix: added missing check on password length
  • Loading branch information
thorsten committed Dec 23, 2022
1 parent 810ee26 commit 8beed2f
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions phpmyfaq/ajaxservice.php
Expand Up @@ -776,14 +776,17 @@
break;
}

$userData = [
'display_name' => $userName,
'email' => $email,
'is_visible' => $isVisible === 'on' ? 1 : 0
];
$success = $user->setUserData($userData);

if (0 !== strlen($password) && 0 !== strlen($confirm)) {
if (strlen($password) <= 7 || strlen($confirm) <= 7) {
$message = ['error' => $PMF_LANG['ad_passwd_fail']];
break;
} else {
$userData = [
'display_name' => $userName,
'email' => $email,
'is_visible' => $isVisible === 'on' ? 1 : 0
];
$success = $user->setUserData($userData);

foreach ($user->getAuthContainer() as $author => $auth) {
if ($auth->setReadOnly()) {
continue;
Expand Down

0 comments on commit 8beed2f

Please sign in to comment.