mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-10 11:15:27 +00:00
Fix infinite loop in case a flood wait is triggered
This commit is contained in:
@@ -299,7 +299,9 @@ class Client:
|
||||
print("Hint: {}".format(r.hint))
|
||||
self.password = input("Enter password: ") # TODO: Use getpass
|
||||
|
||||
self.password = r.current_salt + self.password.encode() + r.current_salt
|
||||
if type(self.password) is str:
|
||||
self.password = r.current_salt + self.password.encode() + r.current_salt
|
||||
|
||||
password_hash = sha256(self.password).digest()
|
||||
|
||||
r = self.send(functions.auth.CheckPassword(password_hash))
|
||||
|
Reference in New Issue
Block a user