mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-02 19:20:09 +03:00
Fix RSA unpacking bug
this can be seen when using test servers. when fingerprints are None. (error was TypeError: cannot unpack non-iterable NoneType object)
This commit is contained in:
parent
4839d8bf59
commit
24193a2424
|
@ -66,7 +66,7 @@ def encrypt(fingerprint, data, *, use_old=False):
|
|||
the cipher text, or None if no key matching this fingerprint is found.
|
||||
"""
|
||||
global _server_keys
|
||||
key, old = _server_keys.get(fingerprint, None)
|
||||
key, old = _server_keys.get(fingerprint, [None, None])
|
||||
if (not key) or (old and not use_old):
|
||||
return None
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user