Skip to content
Permalink
Browse files

Fix RSA key unpacking on missing fingerprint (#1324)

  • Loading branch information...
painor authored and Lonami committed Nov 5, 2019
1 parent 4839d8b commit 4a1310dc21517bc1e8b5da7c2ad1121b134028a5
Showing with 1 addition and 1 deletion.
  1. +1 −1 telethon/crypto/rsa.py
@@ -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

0 comments on commit 4a1310d

Please sign in to comment.
You can’t perform that action at this time.