Add a few security checks when unpacking messages from server

Also delete MtProto 1.0 leftovers.
This commit is contained in:
Lonami Exo
2018-01-06 02:03:23 +01:00
parent 3eafe18d0b
commit 6f690945f1
2 changed files with 16 additions and 25 deletions

View File

@@ -53,6 +53,7 @@ class CryptoTests(unittest.TestCase):
@staticmethod
def test_calc_key():
# TODO Upgrade test for MtProto 2.0
shared_key = b'\xbc\xd2m\xb7\xcav\xf4][\x88\x83\' \xf3\x11\x8as\xd04\x941\xae' \
b'*O\x03\x86\x9a/H#\x1a\x8c\xb5j\xe9$\xe0IvCm^\xe70\x1a5C\t\x16' \
b'\x03\xd2\x9d\xa9\x89\xd6\xce\x08P\x0fdr\xa0\xb3\xeb\xfecv\x1a' \