From 9110f9a4e1ed9624752f1d829bf823088b047877 Mon Sep 17 00:00:00 2001 From: AliRezaBeigy Date: Sat, 24 Sep 2022 12:50:02 +0330 Subject: [PATCH] Fix TypeError during data decryption (#3833) --- telethon/_network/mtprotostate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/_network/mtprotostate.py b/telethon/_network/mtprotostate.py index 19578da3..9fb3f484 100644 --- a/telethon/_network/mtprotostate.py +++ b/telethon/_network/mtprotostate.py @@ -143,7 +143,7 @@ class MTProtoState: msg_key = body[8:24] aes_key, aes_iv = self._calc_key(self.auth_key.key, msg_key, False) - body = AES.decrypt_ige(body[24:], aes_key, aes_iv) + body = AES.decrypt_ige(bytes(body[24:]), aes_key, aes_iv) # https://core.telegram.org/mtproto/security_guidelines # Sections "checking sha256 hash" and "message length"