Skip to content

Commit

Permalink
Fix for #4554
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsteampassnet committed Jan 28, 2025
1 parent 1cd4213 commit 4ddcd77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sources/main.queries.php
Original file line number Diff line number Diff line change
Expand Up @@ -3298,11 +3298,11 @@ function changeUserLDAPAuthenticationPassword(
}
// Get one itemKey from current user
$currentUserKey = DB::queryFirstRow(
'SELECT ski.share_key, ski.increment_id
'SELECT ski.share_key, ski.increment_id, l.id_user
FROM ' . prefixTable('sharekeys_items') . ' AS ski
INNER JOIN ' . prefixTable('log_items') . ' AS l ON ski.object_id = l.id_item
WHERE l.id_user = %i
ORDER BY date DESC
WHERE ski.user_id = %i
ORDER BY RAND()
LIMIT 1',
$post_user_id
);
Expand All @@ -3311,7 +3311,7 @@ function changeUserLDAPAuthenticationPassword(
// Decrypt itemkey with user key
// use old password to decrypt private_key
$itemKey = decryptUserObjectKey($currentUserKey['share_key'], $privateKey);

if (empty(base64_decode($itemKey)) === false) {
// GOOD password
// Encrypt it with current password
Expand Down

0 comments on commit 4ddcd77

Please sign in to comment.