マスターパスワードの照合を追加
This commit is contained in:
parent
7087090211
commit
0f21c03003
1 changed files with 16 additions and 2 deletions
|
@ -103,12 +103,26 @@ class Lock(customtkinter.CTkToplevel):
|
|||
"pc_number": int(client_config["pc_number"]),
|
||||
"password": self.hash_genarate(str(self.password_entry.get()))
|
||||
}
|
||||
responce = requests.post(auth_url, json=auth_json)
|
||||
try:
|
||||
responce = requests.post(auth_url, json=auth_json)
|
||||
except:
|
||||
master_password_hash = self.hash_genarate(str(self.password_entry.get()))
|
||||
if client_config["master_password_hash"] == master_password_hash:
|
||||
self.destroy()
|
||||
app.exit()
|
||||
else:
|
||||
self.msg_subtitle_1.configure(text='サインインするには、パスワードが必要です。\nネットワークエラーが発生しています。\n続行するには、マスターパスワードを入力して下さい。')
|
||||
|
||||
if responce.status_code == 200:
|
||||
self.destroy()
|
||||
app.exit()
|
||||
else:
|
||||
self.msg_subtitle_1.configure(text='サインインするには、パスワードが必要です。\nパスワードが違います!')
|
||||
master_password_hash = self.hash_genarate(str(self.password_entry.get()))
|
||||
if client_config["master_password_hash"] == master_password_hash:
|
||||
self.destroy()
|
||||
app.exit()
|
||||
else:
|
||||
self.msg_subtitle_1.configure(text='サインインするには、パスワードが必要です。\nパスワードが違います!')
|
||||
|
||||
def handler_close(self):
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue