Skip to content

Commit

Permalink
Security: fix warning in hash generation -refs BT#21323
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoDucou committed Jan 29, 2024
1 parent 6691661 commit 8b49c4f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions main/inc/lib/api.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -10633,7 +10633,6 @@ function api_decrypt_ldap_password(string $encryptedText): string
*/
function api_decrypt_hash(string $encryptedHash, string $secret): string
{
$secret = hex2bin($secret);
$iv = base64_decode(substr($encryptedHash, 0, 16), true);
$data = base64_decode(substr($encryptedHash, 16), true);
$tag = substr($data, strlen($data) - 16);
Expand Down Expand Up @@ -10663,7 +10662,6 @@ function api_decrypt_hash(string $encryptedHash, string $secret): string
*/
function api_encrypt_hash($data, $secret)
{
$secret = hex2bin($secret);
$iv = random_bytes(12);
$tag = '';

Expand Down

0 comments on commit 8b49c4f

Please sign in to comment.