Skip to content

Commit

Permalink
fix: added missing check on LDAP to avoid password checks (#2943)
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed May 6, 2024
1 parent 848b32b commit 0378ade
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion phpmyfaq/api.service.php
Expand Up @@ -857,6 +857,7 @@
$user = CurrentUser::getFromSession($faqConfig);

$isAzureAdUser = $user->getUserAuthSource() === 'azure';
$isLdapUser = $user->getUserAuthSource() === 'ldap';

if ($deleteSecret === 'on') {
$secret = '';
Expand All @@ -870,7 +871,7 @@
break;
}

if (!$isAzureAdUser) {
if (!$isAzureAdUser && !$isLdapUser) {
if ($password !== $confirm) {
$response->setStatusCode(Response::HTTP_CONFLICT);
$response->setData(['error' => Translation::get('ad_user_error_passwordsDontMatch')]);
Expand Down

0 comments on commit 0378ade

Please sign in to comment.