Skip to content

Commit 8b49c4f

Browse files
committed
Security: fix warning in hash generation -refs BT#21323
1 parent 6691661 commit 8b49c4f

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

main/inc/lib/api.lib.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10633,7 +10633,6 @@ function api_decrypt_ldap_password(string $encryptedText): string
1063310633
*/
1063410634
function api_decrypt_hash(string $encryptedHash, string $secret): string
1063510635
{
10636-
$secret = hex2bin($secret);
1063710636
$iv = base64_decode(substr($encryptedHash, 0, 16), true);
1063810637
$data = base64_decode(substr($encryptedHash, 16), true);
1063910638
$tag = substr($data, strlen($data) - 16);
@@ -10663,7 +10662,6 @@ function api_decrypt_hash(string $encryptedHash, string $secret): string
1066310662
*/
1066410663
function api_encrypt_hash($data, $secret)
1066510664
{
10666-
$secret = hex2bin($secret);
1066710665
$iv = random_bytes(12);
1066810666
$tag = '';
1066910667

0 commit comments

Comments
 (0)