1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 07:38:58 +01:00

Hotfix: bytes to string

This commit is contained in:
Alexander Pankratov 2023-08-08 18:47:22 +02:00
parent 28269b1b76
commit 0689c16309

View File

@ -1103,8 +1103,8 @@ trait Files
return 0;
}
if (isset($messageMedia['cdn_key'])) {
$ivec = \substr($messageMedia['cdn_iv'], 0, 12).\pack('N', $offset['offset'] >> 4);
$res['bytes'] = Crypt::ctrEncrypt($res['bytes'], $messageMedia['cdn_key'], $ivec);
$ivec = \substr((string)$messageMedia['cdn_iv'], 0, 12).\pack('N', $offset['offset'] >> 4);
$res['bytes'] = Crypt::ctrEncrypt($res['bytes'], (string)$messageMedia['cdn_key'], $ivec);
$this->checkCdnHash($messageMedia['file_token'], $offset['offset'], $res['bytes'], $old_dc);
}
if (isset($messageMedia['key'])) {