mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-16 10:06:39 +00:00
Add missing nonce check during authentication
This commit is contained in:
parent
d5e6dbe36b
commit
e20203785a
@ -78,6 +78,8 @@ def _do_step2(data: Step1, response: bytes, random_bytes: bytes) -> Tuple[bytes,
|
||||
nonce = data.nonce
|
||||
res_pq = ResPq.from_bytes(response)
|
||||
|
||||
check_nonce(res_pq.nonce, nonce)
|
||||
|
||||
if len(res_pq.pq) != 8:
|
||||
raise ValueError(f"invalid pq size: {len(res_pq.pq)}")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user